Each version of lunr.py only works with a specific version of lunr.js.
Therefore we must hardcode the specific version of lunr.py in our
requirements. As we recently updated to lunr.js version 2.3.8 (#1995),
that coincides with lunr.py version 0.5.6. See the lunr.py CHANGELOG for
coinciding versions: https://github.com/yeraydiazdiaz/lunr.py/blob/master/CHANGELOG.md
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.
Previously, opening a dropdown from the mobile-sized nav header would break
things if the user resized the window to be desktop-sized again. This was due
to an attempted fix to allow the mobile-sized nav header to scroll when it had
many elements.
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
This patch allows dropdowns with many items to scroll, rather than overflowing
beyond the bounds of the page. Due to the complexities of CSS, this requires
nested dropdowns to be given a fixed position which is initialized via JS.
In addition, this patch changes the behavior of nested dropdowns to require a
click to open (more consistent with the root dropdown, and improves UX on
mobile devices). It also fixes the UI on small screens, adding the nested
dropdown "in-place" when it's opened and allowing the whole navbar to scroll
if there are many items.
The nose docs state:
> Nose has been in maintenance mode for the past several years and will
> likely cease without a new person/team to take over maintainership.
> New projects should consider using Nose2, py.test, or just plain
> unittest/unittest2.
As we aren't using any of nose's features, its easiest to switch
to the standard lib unittest.
Also clean us various warnings as Nose was hiding them:
* warn => warning
* assertRegexpMatches => assertRegex
* Ensure 'new' files are closed.
* Cleanup tempdir
* assertEquals => assertEqual
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.
This patch uses `scroll-padding-top` to indicate that when the user clicks on
an anchor and the browser scrolls to it, the anchor should have that amount of
padding on the top, thus neatly accommodating the fixed nav header without any
gross hacks!
Fixes#1931.
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.
- no need for `type/css` in HTML5 documents
- having `rel="stylesheet"` first can improve readability/scannability of the code and as it's more consistent aids with gZip compression.