Skip to content

MkDocs Setup Instructies

Installatie

Stap 1: Installeer Python (als je dat nog niet hebt)

Download Python van https://www.python.org/downloads/

Stap 2: Installeer MkDocs en dependencies

# Vanuit de Invoice directory
pip install -r requirements-docs.txt

Of installeer handmatig:

pip install mkdocs mkdocs-material pymdown-extensions

Gebruik

Lokaal serveren (development)

# Vanuit de Invoice directory
npm run docs:serve

# Of direct met MkDocs
mkdocs serve

De documentatie is dan beschikbaar op: http://127.0.0.1:8000

De server herlaadt automatisch wanneer je bestanden wijzigt.

Build voor productie

npm run docs:build

# Of direct
mkdocs build

Dit genereert een site/ folder met statische HTML bestanden die je overal kunt hosten.

Deploy naar GitLab Pages

GitLab Pages wordt automatisch geconfigureerd via .gitlab-ci.yml. Push naar main of master branch en de documentatie wordt automatisch gebouwd en gehost.

URL na deployment:

https://<username>.gitlab.io/<project-name>/

Zie GITLAB_PAGES.md voor meer informatie.

Deploy naar GitHub Pages (alternatief)

Als je ook GitHub gebruikt:

npm run docs:deploy

# Of direct
mkdocs gh-deploy

Let op: Pas eerst de repository URL aan in mkdocs.yml voordat je deployt.

Document Structuur

  • index.md - Homepage van de documentatie
  • onderzoek.md - Volledig onderzoeksdocument (hoofddocument)
  • owasp-top10-api.md - OWASP Top 10 literatuurstudie (Deelvraag 1)
  • owasp-top10-project.md - Project specifieke code review (Deelvraag 2)
  • zap-report.md - ZAP scan resultaten (Deelvraag 3)
  • zap-issues.md - Uitleg van ZAP gevonden issues
  • zap-automation.md - ZAP automatisering setup handleiding

Configuratie

De configuratie staat in mkdocs.yml in de root van het Invoice project.

Thema

De documentatie gebruikt het Material thema met:

  • Dark/Light mode toggle
  • Zoekfunctionaliteit
  • Responsive design
  • Tab navigatie

Aanpassen

Je kunt de configuratie aanpassen in mkdocs.yml:

  • Site naam en beschrijving
  • Repository links
  • Thema kleuren
  • Navigatie structuur

Probleemoplossing

"mkdocs: command not found"

Zorg dat Python en pip geïnstalleerd zijn, en dat MkDocs correct geïnstalleerd is:

pip install --upgrade mkdocs mkdocs-material

Port al in gebruik

Als poort 8000 al in gebruik is, gebruik dan:

mkdocs serve -a localhost:8001

Bestanden niet gevonden

Zorg dat je de bestanden in de docs/ folder hebt staan en dat de namen in mkdocs.yml overeenkomen.