1457 Commits

Author SHA1 Message Date
Waylan Limberg
ff0b726056 Bump version to 1.1.2. 1.1.2 2020-05-14 11:07:56 -04:00
Waylan Limberg
58d70c2f87 Normalize IP addresses and change error to warning
All IP addresses passed to `dev_addr` are now normalized.
`127.000.000.001` is normalized to `127.0.0.1`.

With apologies to docker container users, the address `0.0.0.0`
no longer raises an error but a warning instead. Apparently,
docker containers need to use that address, even in dev environments.

Closes #2108.
2020-05-14 10:51:01 -04:00
Waylan Limberg
85b3befb6a Bump version to 1.1.1. 1.1.1 2020-05-12 11:43:50 -04:00
Waylan Limberg
0d17a52899 Flake8 cleanup.
It appears that the latest version of flake8 caught a couple more things.
2020-05-12 11:43:50 -04:00
Ofek Lev
fa5aa4a26e Make compressed sitemap deterministic (#2100) 2020-05-12 10:05:39 -04:00
Waylan Limberg
a4eb4eb42b Fix markdownlint test (#2095)
Travis only gives us Node.js version 8 so we must use an older
version of markdownlint. To declare a newer node.js version we
lose the ability to have Python as the lang and install tox.
If/when the default node version gets updated, remove the
version restriction on markdownlint.
2020-05-07 00:07:38 -04:00
Oleh Prypin
1ad6a91e3f Use README.md as index.html when use_directory_urls is false 2020-04-26 18:34:05 -04:00
Waylan Limberg
3bada392d2 Ignore links which start with a backslash.
Fixes #1680.
2020-04-19 17:52:19 -04:00
Waylan Limberg
7b68f7b828 Pass builder to on_serve event.
Every call to `server.watch` requires `builder` to be passed in. If
users are to add their own watched files, then they need access to
`builder`. Fixes #1952.
2020-04-19 16:15:29 -04:00
Waylan Limberg
f532ade3ab Remove deprecated theme_dir option from CLI.
This should have been removed some time ago. Fixes #2042.
2020-04-19 15:48:24 -04:00
Waylan Limberg
7428679a1c Set dependency to lunr[languages]==0.5.8.
Lunr.py version 0.5.8 maintains compatability with Lunr.js 2.3.8, but
restricts its dependnecy to nltk>=3.2.5,<3.5, which avoids installation
issues on some Docker images. Fixes #2062.
2020-04-18 16:30:29 -04:00
Ofek Lev
afa18ae2c0 Fix typo 2020-04-12 17:40:37 -04:00
Tsuyoshi Hombashi
e092584ca9 Remove disable_unicode_literals_warning config 2020-04-04 20:25:26 -04:00
Sam Thursfield
914a9fa20b Correct error message
Fixes #2009
2020-03-28 14:43:38 -04:00
Derek Ardolf
a4ccf611b0 Update docs to reflect supported versions. 2020-03-25 14:01:09 -04:00
wodny
63b3eb5a1f Fix readthedocs code colors
Fixes #2027.
2020-03-24 14:18:40 -04:00
Jim Conner
2505a907f4 Add minimum search length configuration parameter.
Allow users to set their own minimum search term length.  Fixes #2014.
2020-03-16 14:35:06 -04:00
Waylan Limberg
653ba22230 Clean up dev_addr validation and disallow 0.0.0.0
MkDocs has never supported using the included server for production.
However, some users have been using it that way. This would prevent that.

We also actually validate IP addresses now.
2020-03-11 22:45:49 -04:00
Waylan Limberg
fef8a89ba2 Ensure bdist_wheel no longer creates a universal wheel
MkDocs no longer suports Python 2. Therefore, a universal wheel would be
innapropriate as it results in `py2.py3`.
2020-03-11 09:40:19 -04:00
albandewilde
2b92209d12 Correct the block name of the search box in the doc
As mentionned here: https://github.com/mkdocs/mkdocs/issues/1142#issuecomment-282899537
I just correct the name in the documentation
2020-03-09 16:13:01 -04:00
Christian Oliff
fe7f0abef9 Use type search for search input
doesn't make a difference to how it works but is more semantically correct.
2020-02-26 19:31:09 -05:00
Tsuyoshi Hombashi
74713147ec Fix a minimum dependency description
Markdown package require 3.2.1 at mkdocs 1.1
2020-02-26 12:49:24 -05:00
Waylan Limberg
eddeeab066 Bump version to 1.1 1.1 2020-02-22 19:10:35 -05:00
Waylan Limberg
675681448e Ensure lunr.py version matches lunr.js
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
2020-02-22 18:33:38 -05:00
Tim Gates
b144b50a46 Fix simple typo: seperate -> separate
Closes #1997
2020-02-22 16:52:09 -05:00
Jim Porter
adfd76d66f Put the mobile menu button for the mkdocs theme on the right
This behavior matches MkDocs 1.0 as well as the examples on the Bootswatch
site.
2020-02-21 20:18:13 -05:00
Jim Porter
13337eba9f Nested dropdowns *are* supported in the mkdocs theme
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.
2020-02-21 19:40:00 -05:00
Jim Porter
d34062eaf5 Update to lunr.js 2.3.8; resolves #1989 2020-02-21 19:38:17 -05:00
Jim Porter
2935b69a8f Fix indent width in mkdocs/themes/mkdocs/css/base.css 2020-02-21 19:36:55 -05:00
Jim Porter
a7c349cffa Update to lunr-languages v1.4.0; resolves #1729
This renames the Dutch language code to `nl`, the Japanese code to `ja`, and
adds support for Arabic (`ar`) and Vietnamese (`vi`).
2020-02-21 19:08:35 -05:00
Jim Porter
37e645d623 Use toc_tokens to generate the TOC
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.
2020-02-17 17:27:12 -05:00
Waylan Limberg
44f3ae212d Ensure nested dot files in themes are ignored.
Also, document how all files within themes are treated by MkDocs.
Fixes #1981.
2020-02-12 18:35:14 -05:00
Waylan Limberg
4b8ad495ae Ensure travis uses virtualenv<20 2020-02-12 18:35:14 -05:00
Maximilian Albert
bf0698a94a Fix link to virtualenv user guide 2020-02-11 14:23:44 -05:00
Maximilian Albert
d07f5288da Fix typo 2020-02-11 14:23:24 -05:00
Maximilian Albert
5d08c4a9b7 Clarify comment 2020-02-11 14:22:56 -05:00
Jim Porter
2fca717794 Fix fallout from #1967
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.
2020-01-31 10:10:22 -05:00
Jim Porter
058837f68e Improve support for tall nav headers in the mkdocs theme (#1969)
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
2020-01-30 09:34:04 -05:00
Jim Porter
535505b9f2 Improve support for long dropdowns in the mkdocs theme; resolves #1234
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.
2020-01-29 15:44:36 -05:00
Christian Oliff
273e3baa8e remove unneeded type="text/javascript"
Not needed for HTML5 documents (and this isn't used elsewhere).
2020-01-05 19:00:55 -05:00
Adam Twardoch
262c2b70f3 Links to the MkDocs Plugins wiki page, themes and plugins 2019-12-30 09:30:08 -05:00
Waylan Limberg
61105ce56d Update min Markdown version to 3.0. 2019-12-23 15:54:26 -05:00
Waylan Limberg
399f8428b8 Switch from nose to unittest.
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
2019-12-23 15:24:06 -05:00
Waylan Limberg
2491c1433a Update min dependency to Jinja 2.10.1.
Jinja 2.10.1 patched a security valnerability. See the release notes here:
https://github.com/pallets/jinja/blob/master/CHANGES.rst#version-2101

Closes #1780.
2019-12-20 15:01:02 -05:00
Alec Wertheimer
8662df01de Note mkdocs theme filename changes in release notes.
Ref #1897.
2019-12-20 14:27:20 -05:00
Jim Porter
f70a48ee20 Add --use-directory-urls/--no-directory-urls to command line options
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.
2019-12-20 13:33:31 -05:00
Waylan Limberg
d8f8e5be3c Cleanup MarkdownLint issue in docs. 2019-12-20 09:55:19 -05:00
Waylan Limberg
1b8473a652 Add support for Python 3.8. 2019-12-20 09:21:35 -05:00
Waylan Limberg
f601e0ae62 Drop Python 3.4 support. 2019-12-20 09:21:35 -05:00
Waylan Limberg
c9032bd6bf Drop Python 2.7.
* 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.
2019-12-20 08:44:07 -05:00