Skip to content

feature (theme): add light/dark mode toggle across all mkdocs configs#939

Open
AarishShah wants to merge 1 commit intoOWASP:masterfrom
AarishShah:feature/dark-mode-toggle
Open

feature (theme): add light/dark mode toggle across all mkdocs configs#939
AarishShah wants to merge 1 commit intoOWASP:masterfrom
AarishShah:feature/dark-mode-toggle

Conversation

@AarishShah
Copy link
Copy Markdown

Summary

Adds a light/dark mode toggle to the OWASP Top 10 documentation site by configuring the palette option in the MkDocs Material theme.

Changes

Added a palette block to:

  • mkdocs.yml
  • 2021/mkdocs.yml
  • 2025/mkdocs.yml

Two schemes:

  • default: light mode with a ☀️ toggle to switch to dark
  • slate: dark mode with a 🌙 toggle to switch to light

No dependencies added.

Reason

The OWASP Top 10 site currently has no dark mode. The MkDocs Material theme
supports this natively with a simple config change which has been applied.

Testing

Tested locally:

  • 2021/: python -m mkdocs serve from 2021/ directory, all language builds passed
  • 2025/: python -m mkdocs serve from 2025/ directory, English build passed
  • Zero new errors introduced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant