Skip to content

Commit

Permalink
nimble guide improvements (#1321)
Browse files Browse the repository at this point in the history
* docs: add repo to mkdocs header

* docs: support media queries for color scheme

* docs: add edit button

* docs: add nim logo

* docs: add revision date

* docs: add back search plugin
  • Loading branch information
daylinmorgan authored Jan 3, 2025
1 parent 5d4d8db commit db1b76f
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 5 deletions.
48 changes: 48 additions & 0 deletions nimble-guide/docs/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 24 additions & 5 deletions nimble-guide/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
site_name: Nimble User Guide
repo_url: https://github.com/nim-lang/nimble
repo_name: nim-lang/nimble
edit_uri: edit/master/nimble-guide/docs/

theme:
name: material
logo: assets/logo.svg
favicon: assets/logo.svg
features:
- navigation.tabs
- navigation.tabs.sticky
- navigation.expand
- navigation.sections
- toc.integrate
- content.action.edit
palette:
- scheme: default
primary: teal
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: black
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: black
toggle:
icon: material/brightness-4
name: Switch to light mode

name: Switch to system preference


use_directory_urls: false
Expand All @@ -32,6 +48,9 @@ markdown_extensions:
- pymdownx.snippets
- pymdownx.superfences

plugins:
- search
- git-revision-date-localized

nav:
- Home:
Expand Down
1 change: 1 addition & 0 deletions nimble-guide/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
mkdocs-material>=9.5
mkdocs-git-revision-date-localized-plugin

0 comments on commit db1b76f

Please sign in to comment.