Commit Graph

1274 Commits

Author SHA1 Message Date
Waylan Limberg
5ee6600c95 Link to GitHub issues from release notes.
Uses the `mdx_gh_links` Markdown extension. Fixes #644.
2018-03-09 14:08:24 -05:00
Waylan Limberg
fc0a36f752 Simplify path_2_url.
We don't need most of the functionality in pathname2url so we might as
well only use the part we need. Fixes #1429.
2018-03-08 23:09:52 -05:00
Waylan Limberg
dd7e2d910b Refactor search plugin (#1418)
* Use a web worker in the browser with a fallback (fixes #859 & closes #1396).
* Optionally pre-build search index (fixes #859 & closes #1061).
* Upgrade to lunr.js 2.x (fixes #1319).
* Support search in languages other than English (fixes #826).
* Allow the user to define the word separators (fixes #867).
* Only run searches for queries of length > 2 (fixes #1127).
* Remove dependency on require.js, mustache, etc. (fixes #1218).
* Compress the search index (fixes #1128).
2018-03-05 19:42:20 -05:00
Anatoli Babenia
0dce2b2b9e Expand {sha} and {version} is user commit message (#1410) 2018-02-22 09:31:19 -05:00
Waylan Limberg
a793eede8b Update release notes. (#1403) 2018-02-06 14:58:45 -05:00
Mario
a63d885cc8 Update Tables documentation (#1361) 2018-02-02 23:35:21 -05:00
David Hrbáč
a991b7a7e6 Compressed sitemap.xml (#1130) 2018-02-02 15:59:59 -05:00
Pierre Rudloff
84f9d16b4f Defer scripts (#1380)
Currently, page rendering is delayed until all scripts are loaded. But these scripts are not essential to the main content. The `defer` attribute allows the browser to render the page before the scripts are completely loaded so the user can see the webpage earlier.
2018-02-02 15:58:34 -05:00
Pierre Rudloff
00d0ab9228 Add a title attribute to the search input 2018-02-02 15:43:21 -05:00
Christian Oliff
d9ced99099 Update RespondJS to latest version (#1398)
Polyfill for media queries.
REF: https://github.com/scottjehl/Respond/releases
2018-01-29 11:41:46 -05:00
Christian Oliff
cc03d7666e Always load Google Analytics over HTTPS (#1397)
Is faster, safer and the recommended method by Google.
2018-01-29 09:07:59 -05:00
Yeray Diaz Diaz
8a6d7f624f Avoid background-attachment: fixed for better performance (#1395)
Fixes #1394.
2018-01-27 16:05:29 -05:00
Waylan Limberg
462584f328 Provide more version info. (#1393)
This should help when providing support to users with multiple Pythons
installed on their system. The `--version` flag's output mimics pip.
Specifically, the location `mkdocs` is installed at and the Python
version it is installed under.

Typical output might look like:

    mkdocs, version 0.17.2 from /usr/local/lib/python2.7/site-packages/mkdocs (Python 2.7)
2018-01-25 13:07:15 -05:00
Waylan Limberg
4b8687eee7 Refactor writing-your-docs.md (#1392)
Present the sections in a logical manner:

1. File Layout (where to save documents)
   * Configure Navigation...
2. Writing with Markdown
   * Supported extensions...

Added documentation for all included extensions. Also added some basic
information about Markdown; pointing to the implementation and rules.
Fixes #1385, fixes #316, and fixes #1172.
2018-01-23 16:29:14 -05:00
Yeray Diaz Diaz
6265416783 Workaround Safari bug when zooming to < 100% (#1389) 2018-01-21 16:02:51 -05:00
Yeray Diaz Diaz
cd396ada13 Remove addition of clicky class to body and animations. (#1387) 2018-01-20 16:24:26 -05:00
Yeray Diaz Diaz
47afdfd77e Prevent reinjection of extra Javascript files on reload (#1388) 2018-01-20 16:22:28 -05:00
brandongc
d00a8e52f5 Refactor utils.copy_media_files for more flexibility (#1370) 2018-01-05 14:01:34 -05:00
Waylan Limberg
fc2f105bad Document how to generate/install manpages. (#1302)
Fixes #686.
2017-12-31 22:19:58 -05:00
Alexandre ZANNI
8d4a883d89 change theme_dir to custom_dir 2017-12-29 08:42:24 -05:00
Brendan Abbott
ab0b5824d0 Update Release Notes regarding Search plugin. (#1364)
Outline that the path where the search index is written to has changed slightly from `mkdocs/` to `search/`
2017-12-18 11:22:10 -05:00
Waylan Limberg
b9b37491e9 Update Python-Markdown links.
Python-Markdown has moved its documentation to
https://python-markdown.github.io/. See Python-Markdown/markdown#601
for details. The docs now point to the new location.

The Python-Markdown GitHub repo was also moved to
https://github.com/Python-Markdown/markdown so any links to the repo
have been updated as well.
2017-12-07 12:04:28 -05:00
Waylan Limberg
dfb50c9160 Remove PyPI Deployment Docs.
PyPI's documentation hosting has been deprecated, and in fact, it
is no longer possable to upload documentation to PyPI. Therefore,
it is a disservice to our users to document how to deploy to that
service.

See the mailing list dicussions for the official announcement:
https://mail.python.org/pipermail/distutils-sig/2015-May/026327.html
https://mail.python.org/pipermail/distutils-sig/2015-May/026381.html
2017-12-07 12:04:28 -05:00
Matthew Schmoyer
4c7c69cd3a Fix typo with plugins module name 2017-11-29 21:58:35 -05:00
Robin Stevens
e46506b4ce Typo (#1357) 2017-11-27 11:58:04 -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