Commit Graph

1213 Commits

Author SHA1 Message Date
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
Waylan Limberg
99936b803b Remove previously deprecated json command.
Closes #481.
2017-10-01 16:48:47 -04:00
Waylan Limberg
9e051a3636 Remove more PY26 specific code. See #165 & #688. 2017-10-01 16:48:47 -04:00
Waylan Limberg
418965977f Drop support for Python 2.6.
MkDocs most likley will no longer run on Python 2.6. All relevant tests
have been removed. Closes #165.
2017-10-01 16:48:47 -04:00
Waylan Limberg
931e8d0ab8 Bumped version to 1.0.dev 2017-10-01 16:48:47 -04:00
Scott Radvan
ca36f0c341 Fix two minor typos. 2017-09-28 08:19:40 -04:00
Waylan Limberg
e918f96894 Do not copy permissions with files.
In various stages of a build, a new file may overwrite a previously written
file (for example to override a theme). If a source file is read-only, the
copied file cannot remain read-only. Therefore, permissions must not be
copied with a file. `shutil.copyfile` only copies a file's contents and is
now being used to copy all files.

Fixes #1292.
2017-09-27 15:08:45 -04:00
Waylan Limberg
b8123ffb86 Remove ez-setup.py from appveyor.yml. (#1293)
get_pip.py already installs setuptools and ez_setup.py is deprecated.
2017-09-27 14:50:47 -04:00
Frank Sachsenheim
31de2edc37 Properly validate edit_uri config setting (#1273)
Account for edit_uri being None. And move handling to config validation rather than 
revalidating/reformatting on each page in the nav.
2017-09-08 15:23:44 -04:00
Waylan Limberg
74660b8254 Refactor .travis.yml to use matrix. (#1274)
Refactor .travis.yml to use matrix.

Travis-CI no longer installs all supported Python versions by default. We
need to define the Python version(s) we want in the `python` config setting
to ensure that that version is installed before running the tests.
Therefore, we need a matrix of `python` and `env` settings to ensure the
proper Python versions are matched up with their corresponding tox
environments. We can also isolate dependencies to specific envs.
2017-09-07 13:08:21 -04:00
euvbonk
e59e876015 Close file properly after writing, which leads to empty a file using jython. 2017-07-24 08:56:31 -04:00
Waylan Limberg
46a382d829 Validate dev_addr config option.
Ensure reasonable error messages are returned on bad input.

This validates everything except the "host". We could use the ipaddress lib,
but we also should accept hostnames, not just IP addresses. However, by
validating the format and port, the address can more reliably be passed
to the server. The server does its own validation of the host and provides
its own reasonable error meessage.

As a side effect, we now support IPv6 as well as IPv4. Previously, the
port was not properly separated from an IPv6 address. Now that it is,
and the server already supports IPv6, we get support for free.

Fixes #1237.
2017-06-09 11:51:51 -04:00
Sergio Sisternes
38a0579b34 Improve relative path to images on Windows (#1233)
In win32 the routes uses backslashes (e.g. level1\level2\index.md) instead of slashes (level1/level2/index.md). This was causing the incorrect execution of the URL hack for images reported in the issue.
2017-06-05 10:47:08 -04:00
Oscar Vasquez
aa9a2fdcea Added support for query and fragment strings in edit_uri 2017-05-12 23:42:27 -04:00
Tom Christie
852401467a Removed erronous download badge.
Not sure where it was getting it's number from, but I know PyPI has deprecated that interface, and it was clearly vastly under-reporting.
2017-04-07 15:42:08 +01:00
Tom Christie
bfddb794b4 Merge pull request #1202 from NickVolynkin/fix-link-to-tom-christie
fix the link to Tom Christie in the copyright notice
2017-04-07 15:18:11 +01:00
Nick Volynkin
2e07efacac fix the link to Tom Christie in the copyright notice 2017-04-07 10:55:47 +07:00
Georgii Staroselskii
bf4938d5b9 custom-themes.md: fix a homepage typo (#1199)
s/hompage/homepage
2017-04-06 08:50:09 -04:00
Sebastian Raschka
b3ca24234b insert whitespace after url (#1197) 2017-04-06 08:49:13 -04:00
Waylan Limberg
f8c3433b3d Bump version to 0.16.3. 0.16.3 2017-04-04 17:56:12 -04:00
Kyle Gregory
f712311d7c ReadtheDocs theme TOC scroll bug (#1193)
Fixes a JavaScript error when looking for a current page in the TOC
when there is not a current page selected, in the case of Search, 404
or any page that isn’t listed in the TOC. This checks if a TOC item
with the class of ‘current’ is in the document, and if not, does not
call the viewport check or scroll the TOC area.

Fixes #1177.
2017-04-04 17:43:33 -04:00
Waylan Limberg
4769f0054e Start release notes for 0.16.3 (#1192) 2017-04-04 14:13:40 -04:00
Terrell Russell
59026644f1 fix typo (#1185)
Fixes #1184
2017-04-04 10:07:20 -04:00
John Kerssens
82bcdbab69 Fix typos (#1181) 2017-04-04 10:07:02 -04:00
Jeffrey Tolar
199195b0fe Fix live reload
This fixes a regression caused by efbc78922d (#1141).
2017-03-20 19:22:08 -04:00
Waylan Limberg
8c9773dc36 Version bump to 0.16.2 2017-03-13 21:59:01 -04:00
Waylan Limberg
7a8159738f Updated release-notes. 2017-03-13 21:45:34 -04:00
Waylan Limberg
1795d7655a System root ("/") is not a valid path for site_dir or docs_dir.
As neither setting can point at a child dir of the other, "/" would be an
invalid value for either setting. However, given its unique nature,
os.path.abspath does not follow normal bahavior of returning a string without
an ending slash when passed "/". Therefore, we need to special case it.

Fixes #1161.
2017-03-13 21:45:34 -04:00
Waylan Limberg
3833627886 Add tests for common prefixes in docs_dir & site_dir.
Related to #1011. This test should have been added when PR #1012 was committed.
2017-03-13 21:45:34 -04:00
Dougal Matthews
571bbbfb91 Merge pull request #1160 from itamaro/patch-2
Fix spelling
2017-03-13 11:13:27 +00:00
Itamar Ostricher
48ad73c64b Fix spelling 2017-03-13 11:57:25 +02:00
Dougal Matthews
7805631c4e Merge pull request #1159 from itamaro/patch-1
Fix spelling
2017-03-13 08:59:47 +00:00
Itamar Ostricher
b16dfa6d36 Fix spelling 2017-03-13 10:48:13 +02:00
Waylan Limberg
58441f368b Templates have extension .html (typo fix in docs). 2017-03-12 19:36:59 -04:00
Waylan Limberg
a877aae8a8 Refactor readthedocs navigation template.
* Fix a nested `<li>` bug.
* More closely replicate nesting of the Sphinx theme nav (related to #588).
* If sections headers ever get urls, this will support them (related to #73).
2017-03-11 17:32:05 -05:00
SquareWaffles
f8ad209668 Mobile TOC height with scroll
Added override for the mobile TOC to be "height:100%" so it does not account for the previous/next navigation buttons that are visible on the desktop view.
2017-03-11 17:30:57 -05:00
SquareWaffles
567dcb7d72 Focus TOC on load
The code is a copy of code posed on Jan 10, 2017 on issue 803.  This just incorporates the auto scroll into the theme itself without the need for additional custom.js file.
2017-03-11 17:30:57 -05:00
SquareWaffles
f6627d2c55 Adjust TOC scrollbar
This built upon previous code so that when the scrollbar is viable the bottom arrow is not covered by the "Next" navigation button.  This is actually an improvement over ReadTheDocs as the same overlapping behavior happens there.
2017-03-11 17:30:57 -05:00
SquareWaffles
1cd133d28a Updat GitHub class name
GitHub link was not showing.  Found out that the class name should be "fa fa-github".
2017-03-11 17:30:57 -05:00
Kevin J. Qiu
590ae3114d Fix typo (#1146) 2017-03-01 16:10:45 -05:00
Akhil Lawrence
5b9e3d8366 Add support to dev server to serve custom error pages (#1141)
Fixes #1040.

* review comments
2017-02-23 14:16:55 -05:00
Waylan Limberg
daf97c282b Ensure nav.homepage.url is not blank on error pages. (#1132)
Also maintain pattern of ending urls with a slash in nav (all non-error pages
do so the error page should also). A couple extra checks to ensure base_url
doesn't end in a slash though as it is expected that the string appended
to base_url will always begin with a slash.

Fixes #1131
2017-01-29 20:34:13 -05:00
Waylan Limberg
3c8a1fccca Up livereload version to >=2.5.1. (#1122)
This ensures older pyinotify versions don't break the livereload server.
Fixes #1106.
2017-01-08 17:53:08 -05:00