Despite Bootswatch not supporting nested dropdowns, the theme-specific CSS for
the mkdocs theme does add support for it, so we can remove the warning from
the release notes.
This patch improves the consistency of TOC levels, so now the level is always
equal to the N in the `<hN>` tag. It also allows users of the MkDocs theme to
set the navigation depth to show in the TOC panel (defaulting to 2).
Resolves#1910 and resolves#770.
This adds a new JS function called `applyTopPadding` that updates the top
padding of a few elements in the document to account for the height change
when the nav header is more than one row. Resolves#716
Standardize the list of build in arguments that can be passed to
commands that build docs (build, serve, and gh-deploy). All three
can now use --config-file, --strict, --theme, --theme-dir, and the new
--use-directory-urls/--no-directory-urls. Fixes#1401.
* Disable Linkchecker Test.
* Switch to unittest.mock in standard lib.
* Apply `pyupgrade --py3-plus`.
* Note: Using `builtins.open` mocks all calls to `open`, including test setup
(such as in `load_config`). Whereas, `path.to.namespace.open` only mocks
`open` in that namepsace. This all worked differently when we used `io.open`
as that wasn't a builtin to begin with.
* Add a helpful error msg for PY2 users who use non-standard install methods.
Closes#1926.
As of Python 3.8, the default event loop on Windows is `proactor`,
however Tornado requires the old default "selector" event loop.
As Tornado has decided to leave this to users to set, MkDocs needs
to set it. See https://github.com/tornadoweb/tornado/issues/2608.
Fixes#1885.
A user could place a nested (in the file structure) index page on the root level of the nav.
That file should not return `True` for `page.is_homepage`. Fixes#1919.
This only updates the documentation to better reflect actual behavior.
The config for `theme.custom_dir` is defined in the `theme` config
option of `mkdocs.yml`. Therefore, any `mkdocs_theme.yml` file within
a custom_dir is ignored.
Encode URLs of all internal documents (to account for spaces in
filenames, etc). Then unencode Markdown links to internal pages before
confirming existence, etc. Fixes#1670.
Fixes#588 and fixes#1374.
# Some implementation notes:
## `include_homepage_in_sidebar` setting
Note that the homepage is always linked from the site_name above the
search box. Therefore it does not need to also be in the nav tree.
In the upstream Sphinx theme, this is controlled when defining the
toctree. However, Sphinx has a separate setting for identifying the
"homepage". In MkDocs the homepage is identified as the first item in
the `nav`. Therefore, without this setting you can't exclude the
homepage from the sidebar like you can in Sphinx. With this setting we
get feature parity.
## Nested sections
This output is a little weird as the section title is a link that does
nothing when you click it. You need to click the `+` to expand the
submenu. But that is what the upstream theme requires to work.
As pointed out in #1633 the example of overriding a template block used an undefined block name. The example has been updated to use an actual block name.