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.
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.
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.
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.
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.
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.
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.
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.
* 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).
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.
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.
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.
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