1255 Commits

Author SHA1 Message Date
Waylan Limberg
9ef0ff731d Up version to 0.17.5 0.17.5 2018-07-06 10:19:03 -04:00
Konstantin Molchanov
1c3d3e1e75 Fix Python 3.7 and PEP 479 incompatibility
With [PEP 479](https://www.python.org/dev/peps/pep-0479/) implemented in Python 3.7, raised `StopIteration` is now translated into `RuntimeError`, which breaks `mkdocs build` command.

The recommended way to exit generators is to use `return` instead of raising `StopIteartion`: https://www.python.org/dev/peps/pep-0479/#id39
2018-07-06 10:10:46 -04:00
Waylan Limberg
94bc83ba21 Up version to 0.17.4 0.17.4 2018-06-08 11:01:12 -04:00
Waylan Limberg
f64e35f439 Add multi-level nesting support to sitemap.xml
Fixes #1481.

This is a backport to the 0.17 bugfix branch.
2018-05-09 11:13:07 -04:00
Waylan Limberg
05042644d6 Up version to 0.17.3. 0.17.3 2018-03-07 11:42:48 -05:00
Daniel Wiesendorf
7feb7a8c26 Fixed broken dependency due to tornado 5 update
changed to `"tornado>=4.1,<5.0"` in setup.py
2018-03-07 11:37:59 -05:00
Waylan Limberg
269190c9aa Up version to 0.17.2. (#1350) 0.17.2 2017-11-15 10:34:02 -05:00
Mahdi Majidzadeh
2990af2b63 Config docs should match YAML syntax (#1341) 2017-11-07 18:21:02 -05:00
Waylan Limberg
3ff094d510 Disable markdownlint line_length check for tables and code blocks. 2017-11-07 18:18:01 -05:00
Waylan Limberg
b504e14501 Correct extra_* config setting regressions.
The warning for missing files should only be issued if the config
setting is empty. The warning only exists because we disabled
autopopulating of the settings. Autopopulating only used to run
when the setting was empty so the warning is not nessecary if
the setting has been populated.

Given the above, no string comparisons need to be made as we
only need to check if any files exist when empty. Therefore, we
don't actually need to normalize paths. As we are no longer
modifying users' strings, they can again put any string in their
config, such as URLs of CDNs.

Fixes #1335 & #1336.
2017-11-01 15:24:52 -04:00
Waylan Limberg
109e517f7f Upped version to 0.17.1. 0.17.1 2017-10-30 14:45:58 -04:00
Waylan Limberg
f5b398c145 Support repo_url with missing ending slash.
Also broke up `edit_uri` tests into individual methods and added a few
missing senarious. Fixes #1321.
2017-10-27 13:11:00 -04:00
Waylan Limberg
fd04285432 Add length support to toc.
This could be useful in templates. Fixes #1325.
2017-10-27 11:38:40 -04:00
Waylan Limberg
84ccafce22 Clean up YAML files. 2017-10-27 10:40:54 -04:00
Waylan Limberg
3f2ad4977f Fix search for third-party themes.
Added theme customization settings to the search plugin:

* include_search_page: Determines whether the search plugin expects the
theme to provide a dedicated search page via a template located at
`search/search.html`.

* search_index_only: Determines whether the search plugin should only
generate a search index or a complete search solution.

Themes should define these settings in their `mkdocs_theme.yml` config file.
Documentation has been updated as well. Fixes #1315.

Note: while we would not normally add new settings (features) in a point
(bugfix) release, this is fixing a regression for third party themes.
Therefore, it is a "bugfix" and appropriate for a point release.
2017-10-25 15:46:36 -04:00
Waylan Limberg
886e0074d0 Flake8: Comply with new E722 rule. 2017-10-25 14:52:09 -04:00
Waylan Limberg
54a24ea89f Override site_url with dev_addr on local server.
When serving locally, the `site_url` actually is the `dev_addr`, so the
config should relfect that. Note that this override must happen after
config validation so that the proper defaults are evaluated for the
`dev_addr` setting. It cannot happen as part of "post_validation" as
there is no way to know the dev server is running within the config
validation (for example, the dev_addr may not be None as the user could
have set the `dev_addr` setting in their config file). Overriding it
from the serve command is the least invasive method and guarantees it
only happens when the local dev server is being run.

Also cleaned up `dev_addr` docs, which were missleading in some respects
and actually encouraged using the dev server over a network.

Fixes #1317. 404 Error pages now work on the loval dev server when
the `site_url` in the config points to a subdir.
2017-10-20 15:12:06 -04:00
Waylan Limberg
d393158445 Version to 0.17.0
Also made a couple adjustments to "documented" Python versions.
0.17.0
2017-10-19 19:01:36 -04:00
Waylan Limberg
1477ea87be Some edit_uri tweaks.
* Improve documentation and ensure it matches actual behavior.
* Use `page.edit_url` not `config.edit_url` in mkdocs template (opps).
* Include whitespace between icon and label in mkdocs theme.
* Undefined `edit_uri` results in `page.edit_url = None` when not automated.
* Setting `edit_uri: ''` disables automatic edit_uri for GitHub & Bitbucket.
2017-10-19 14:47:17 -04:00
Waylan Limberg
4b8626c166 Improved theme config docs. 2017-10-19 14:47:17 -04:00
Jesse Kinkead
3f98d1deb3 Add "edit link" support to MkDocs theme.
Theme shows either a repo link or an edit link depending on whether
`edit_uri` is set. Also clarified documentation that this behavior is
dependant upon theme support. Fixes #1129.
2017-10-19 10:05:06 -04:00
Waylan Limberg
84906a7a6c Updated release-notes.
Added last missing item in list of changes.

Changed version from 1.0.0 to 0.17.0 as that will be the next release.
2017-10-18 11:19:26 -04:00
Waylan Limberg
b5f33bf1ea Partially Revert "Remove deprecated autofill of extra configs."
This partially reverts commit f90c44a20d.

The behavior is still deprecated, but a warning is now issued to inform
the user that the "extra" files not listed have been ignored.
2017-10-13 19:29:33 -04:00
Waylan Limberg
555659cdc3 Open files with utf-8-sig to account for BOM.
Python simply discards the BOM with `utf-8-sig`. This way, users of
Microsoft text editors can have their files properly parsered. In all other
ways behaves as reading files using `utf-8` encoding. For more info see:
https://docs.python.org/2/library/codecs.html#encodings-and-unicode

Fixes #1186.
2017-10-13 19:21:10 -04:00
Waylan Limberg
31e7c29784 Set 'search' as a default plugin.
Maintains better backward-compatability. Documentation updated, including
how to override the default. Also renamed the entry_point to 'search'.
The lib is still 'legacy_search'. When a new/better search plugin is
developed, the `search` entry_point will be pointed there so the default
behavior will inlcude the upgrade and a new `entry_point` will be added
('legacy_search') which points to the old plugin for those who really want
it.
2017-10-12 16:12:40 -04:00
Waylan Limberg
66a282c44c Update release notes. 2017-10-04 14:24:13 -04:00
Waylan Limberg
1074c91aa5 Update appveyor config. (#1299)
* pip is already installed by default. No need to install it manually, which was causing an error anyway.
* Confirm tox envs use correct Python version. The documentation at <https://packaging.python.org/guides/supporting-windows-using-appveyor/> seems to suggest it shouldn't work, but it clearly does.
2017-10-04 13:17:00 -04:00
Philippe Ivaldi
5bdd4a62a8 Add option follow_links controling the docs_dir walker to follow directories links (#1134) 2017-10-04 10:04:10 -04:00
Michael Reinhardt
9f5365a496 Add keyboard navigation (#1095) 2017-10-03 15:47:37 -04:00
Waylan Limberg
f90c44a20d Remove deprecated autofill of extra configs. 2017-10-01 16:48:47 -04:00
Frank Sachsenheim
a95c35458f Plugins: Fixes calling of 'pre_page' event. 2017-10-01 16:48:47 -04:00
Frank Sachsenheim
a0e7f17488 Cleanup in plugin docs 2017-10-01 16:48:47 -04:00
Frank Sachsenheim
e1455e7a02 plugins: Adds a load_page_markdown event
This allows to override the loading of source files,
e.g. to fetch it from a remote location or for
generated contents.
2017-10-01 16:48:47 -04:00
Frank Sachsenheim
2b0690d6df Some typos, documentation fixes and Python idioms 2017-10-01 16:48:47 -04:00
Frank Sachsenheim
34cb58c124 Uncomplexifies config_options.Plugins.load_plugin
Also retains all errors of a plugin config.
2017-10-01 16:48:47 -04:00
Frank Sachsenheim
39c81b8a88 Ensures mutable config defaults are copied 2017-10-01 16:48:47 -04:00
Frank Sachsenheim
e76836e1a4 Adds config_options.ConfigItems
This can be used for a sequence of SubConfigs.
2017-10-01 16:48:47 -04:00
Frank Sachsenheim
b2a809600b Some improvements to the plugins module
- makes events available in a module constant
  - can be used by plugins for inspection
- ensures that registered attributes are actually callable
- does not ignore other results than None that also evaluate
  as False in a condition
2017-10-01 16:48:47 -04:00
Frank Sachsenheim
2aded89c30 Adds config_options.File
This option type can be used to validate that a specified
file exists.
2017-10-01 16:48:47 -04:00
Frank Sachsenheim
fe2ffc57a4 Adds support for Python 3.6 2017-10-01 16:48:47 -04:00
Waylan Limberg
ffae0ef89c The Plugin API. (#1223)
See the included documentation for a full explanation of the API.

Search has been removed and wrapped in a plugin (named "legacy_search").
The search feature was ported as-is. None of the open issues with search
have been addressed. Presumably, a new search plugin will be built from
the ground up which addresses those issues.

Note that there is no 'default' plugins. That means that users get no
search unless they enable it in the config by adding the following to
their `mkdocs.yml` file:

    plugins:
        - legacy_search

Fixes #206
2017-10-01 16:48:47 -04:00
kylegregory
82b4b1954d Add 404 page for RTD Theme 2017-10-01 16:48:47 -04:00
Waylan Limberg
75350da44c Theme refactor.
Themes now have `theme` objects, and theme specific configs.
Themes can inherit from other themes. Users (and theme authors)
can define custom static templates and variables.
2017-10-01 16:48:47 -04:00
Waylan Limberg
7985c72c2e Some build.py refactoring and cleanup." 2017-10-01 16:48:47 -04:00
Waylan Limberg
b9af8b1fba Refactor Markdown handling. (#1180)
All Markdown handling is now contained within the `Page` object, which
external code no longer needs to know the internals of.
A slightly different approach to the work started in #713.

Include the multimarkdown meta-data parser from docdata
See: https://github.com/waylan/docdata

Tests have been updated. However, as noted in #713, they could use
some refactoring. The existing tests all pass. We can leave refactoring
as a seperate matter from this.

Closes #713.
2017-10-01 16:48:47 -04:00
Waylan Limberg
b4cc6c3367 Removed special error message for mkdocs-bootstrap and mkdocs-bootswatch themes.
Related to #1168.
2017-10-01 16:48:47 -04:00
Waylan Limberg
8af4b64435 Release-notes cleanup. 2017-10-01 16:48:47 -04:00
Waylan Limberg
74980574a9 Removed workaround for missing main.html in themes.
Related to #1168.
2017-10-01 16:48:47 -04:00
Waylan Limberg
6b1f014c2a Remove deprecated template variables.
Related to #1168.
2017-10-01 16:48:47 -04:00
Waylan Limberg
db56c73795 Remove support for deprecated pages config.
Related to #1168.
2017-10-01 16:48:47 -04:00