15 Commits

Author SHA1 Message Date
Waylan Limberg
a836155549 Add support for a 'dark mode' to mkdocs theme
Also add an optional toggle button for it.

Three new config options have been added:

1. 'color_mode' which can be set to one of 'light', 'dark', or 'auto'.
   Default is 'light' for backward compatability. The 'auto' color mode
   will check the system settings and automaticaly switch to light or
   dark mode on page load or when the system's color mode changes.
2. 'hljs_style_dark': the Highlight.js theme to use in 'dark_mode'.
   Default is 'github-dark' which matches the light mode default of
   'github'. The preexisting config option 'hljs_style' is used for
   'light' mode.
3. 'user_color_mode_toggle':
   Allow users to select their prefered color mode (light, dark, auto) from
   within the browser and save their preference for future page loads. The
   new config option 'user_color_mode_toggle' (default: 'False') can be
   enabled to display a toggle menu in the nav bar. The default value of the
   toggle menu on first load is the value set to 'color_mode'.

MkDocs' own documentation is now configured with 'color_mode: auto'.

Co-authored-by: Oleh Prypin <oleh@pryp.in>
2024-03-16 15:16:48 +01:00
Oleh Prypin
e44134797b on_startup: also pass a boolean dirty to detect --dirtyreload 2022-09-11 23:06:34 +02:00
Oleh Prypin
a56ac6e051 Add plugin events that persist across builds in mkdocs serve
"One-time events" `on_startup(command)`, `on_shutdown`.

Their presence also shows that a plugin *wants* to persist across builds. Otherwise they will be re-created, to not change any existing behavior.
2022-09-11 23:06:34 +02:00
Oleh Prypin
edb646621c Fix event name typo in diagram 2022-08-21 17:12:35 +02:00
Oleh Prypin
f5777a915a Docs: add a diagram with relations between all the plugin events (#2387) 2022-08-07 15:05:44 +02:00
Kyle McNally
fa52d3ae71 Upgrade readthedocs theme to v1.0.0 (#2585)
Includes all upgrades 0.4.1->0.4.2->0.4.3->0.5.0rc->0.5.0rc2->0.5.0->0.5.1->1.0.0rc1->1.0.0

* Add the ability to use a logo in place of site_name in base.html
* New option `anonymize_ip`
* Drop Modernizr.js
* Upgrade jQuery (to 3.6.0) and others
2021-11-07 10:24:30 +01:00
coliff
6c097ecbdb Losslessly optimize images with gulp-imagemin
Saved 197KB (38%)
2018-07-19 11:53:56 -04:00
Waylan Limberg
fa2c1f3823 Added a screenshot to help with Windows installation.
This is, after all, the most commonly encountered problem by users.
At least it seems to be.
2016-09-28 10:15:18 -04:00
Waylan Limberg
fe40c9d1cf Updated Documentation Home Page/Tutorial.
* Updated screenshots to reflect the actual pages in the tutorial (fixes #870).
* Added a few new screenshots to demonstrate more features (search).
* Replaced the `initial-config.png` screenshot with a code block.
* Corrected the inconsistant use of "you" and "we" throughout (use "you").
* Added links to various locations in the docs where appropriate.
* General cleanup, formatting, etc.
2016-04-02 19:45:21 -04:00
Dougal Matthews
eb75c8a71a Expanded the section at the start of styling your docs 2015-04-24 20:43:47 +01:00
Tom Christie
7167406bc9 Ye gads 2014-07-20 19:03:50 +01:00
Tom Christie
eb91f86527 Improve homepage docs 2014-02-05 14:04:46 +00:00
Tom Christie
eea4449398 Add 'in development' note. Refs #29 2014-02-05 11:12:13 +00:00
Tom Christie
4d45ab257a Site docs 2014-01-21 16:46:05 +00:00
Tom Christie
ba0ba16dab Hell, yeah 2014-01-10 23:00:46 +00:00