fix: Interpret custom_dir relative to current directory, not config directory
The custom theme dir handling was not working in case the mkdocs config file was not in the top-level directory. Since mkdocs itself seems only to work in the top-level directory, this PR modifies mkdocs_semiliterate to interpret custom theme dirs relative to the current directory. Also, improves the harmonization between current mkdocs_simple_plugin code and this code. Resolves #28.
This commit is contained in:
parent
9b13ee0b3a
commit
bceddb0701
10 changed files with 466 additions and 16 deletions
97
tests/fixtures/theme-mod-location/refsite/index.html.cropped
vendored
Normal file
97
tests/fixtures/theme-mod-location/refsite/index.html.cropped
vendored
Normal file
|
@ -0,0 +1,97 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="description" content="None" />
|
||||
<title>syspath inclusion</title>
|
||||
|
||||
// Current page data
|
||||
var mkdocs_page_name = "Test of syspath extraction";
|
||||
var mkdocs_page_input_path = "README.md";
|
||||
var mkdocs_page_url = null;
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav" role="document">
|
||||
<p>Kilroy was here.</p>
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="." class="icon icon-home"> syspath inclusion
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="reference internal current" href="#">Test of syspath extraction</a>
|
||||
<ul class="current">
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href=".">syspath inclusion</a>
|
||||
|
||||
</nav>
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="." class="icon icon-home" aria-label="Docs"></a></li>
|
||||
<li class="breadcrumb-item active">Test of syspath extraction</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
</li>
|
||||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div class="section" itemprop="articleBody">
|
||||
|
||||
<h1 id="test-of-syspath-extraction">Test of syspath extraction</h1>
|
||||
<p>Hopefully Kilroy magically visited above.</p>
|
||||
|
||||
</div>
|
||||
</div><footer>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<!-- Copyright etc -->
|
||||
</div>
|
||||
|
||||
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="rst-versions" role="note" aria-label="Versions">
|
||||
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
</div>
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!--
|
||||
-->
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue