docs: fix a bug with offline docs generation

This is a rather annoying bug. It was revealed because CLI reference stopped
working for *offline* docs after the previous commit. Turns out, none of the
plugins we enabled for normal docs were turned on in `mkdocs-offline.yml`.

Thanks to @mondeja for figuring out what was going on.

In the future, we could try a less ugly fix, e.g. turning the `offline` plugin
on or off via an environment variable.

See also:
https://github.com/squidfunk/mkdocs-material/issues/6749
https://github.com/mondeja/mkdocs-include-markdown-plugin/issues/195#issuecomment-1933085478
This commit is contained in:
Ilya Grigoriev 2024-02-07 14:09:29 -08:00
parent 16ec185795
commit 44e1d4a72d
2 changed files with 11 additions and 0 deletions

View file

@ -4,6 +4,14 @@
INHERIT: 'mkdocs.yml'
plugins:
- offline
# For now, *every plugin config* from `mkdocs.yml` has to be repeated here.
# https://github.com/mondeja/mkdocs-include-markdown-plugin/issues/195#issuecomment-1933085478
# https://github.com/mkdocs/mkdocs/issues/3216
- include-markdown # For the CLI reference
- search
- redirects:
redirect_maps:
# Turns out the `offline` plugin forces the following
# option no matter what, and therefore shouldn't be
# used in the main config file.

View file

@ -31,6 +31,9 @@ theme:
extra:
version:
provider: mike
# IMPORTANT: any changes to plugins have to be duplicated in
# `mkdocs-offline.yml`. See that file for more details.
plugins:
- include-markdown # For the CLI reference
- search