mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 18:08:31 +07:00
Deployed ca651fbe0 with MkDocs version: 1.2.3
This commit is contained in:
@@ -245,18 +245,20 @@ Then the test suite can be run for MkDocs by running the command <code>tox</code
|
||||
root of your MkDocs repository.</p>
|
||||
<p>It will attempt to run the tests against all of the Python versions we
|
||||
support. So don't be concerned if you are missing some and they fail. The rest
|
||||
will be verified by <a href="https://travis-ci.org/repositories">Travis</a> when you submit a pull request.</p>
|
||||
will be verified by <a href="https://docs.github.com/actions">Github Actions</a> when you submit a pull request.</p>
|
||||
<h2 id="translating-themes">Translating themes<a class="headerlink" href="#translating-themes" title="Permanent link"></a></h2>
|
||||
<p>To localize a theme to your favorite language, follow the guide on <a href="../../dev-guide/translations/">Translating
|
||||
Themes</a>. We welcome translation Pull Requests!</p>
|
||||
<h2 id="submitting-pull-requests">Submitting Pull Requests<a class="headerlink" href="#submitting-pull-requests" title="Permanent link"></a></h2>
|
||||
<p>Once you are happy with your changes or you are ready for some feedback, push
|
||||
<p>If you're considering a large code contribution to MkDocs, please prefer to
|
||||
open an issue first to get early feedback on the idea.</p>
|
||||
<p>Once you think the code is ready to be reviewed, push
|
||||
it to your fork and send a pull request. For a change to be accepted it will
|
||||
most likely need to have tests and documentation if it is a new feature.</p>
|
||||
<h3 id="submitting-changes-to-the-builtin-themes">Submitting changes to the builtin themes<a class="headerlink" href="#submitting-changes-to-the-builtin-themes" title="Permanent link"></a></h3>
|
||||
<p>When installed with <code>i18n</code> support (<code>pip install mkdocs[i18n]</code>), MkDocs allows
|
||||
themes to support being translated into various languages (referred to as
|
||||
locales) if they respect <a href="https://jinja.palletsprojects.com/en/master/extensions/#i18n-extension">Jinja's i18n extension</a> by wrapping text placeholders
|
||||
locales) if they respect <a href="https://jinja.palletsprojects.com/en/latest/extensions/#i18n-extension">Jinja's i18n extension</a> by wrapping text placeholders
|
||||
with <code>{% trans %}</code> and <code>{% endtrans %}</code> tags.</p>
|
||||
<p>Each time a translatable text placeholder is added, removed or changed in a
|
||||
theme template, the theme's Portable Object Template (<code>pot</code>) file needs to be
|
||||
|
||||
@@ -174,6 +174,10 @@
|
||||
<ul class="nav flex-column">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item" data-level="2"><a href="#version-123-2021-10-12" class="nav-link">Version 1.2.3 (2021-10-12)</a>
|
||||
<ul class="nav flex-column">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item" data-level="2"><a href="#version-122-2021-07-18" class="nav-link">Version 1.2.2 (2021-07-18)</a>
|
||||
<ul class="nav flex-column">
|
||||
</ul>
|
||||
@@ -342,6 +346,42 @@ mkdocs, version 1.0 from /path/to/mkdocs (Python 3.6)
|
||||
<li><a href="https://github.com/d0ugal/">@d0ugal</a></li>
|
||||
<li><a href="https://github.com/waylan/">@waylan</a></li>
|
||||
</ul>
|
||||
<h2 id="version-123-2021-10-12">Version 1.2.3 (2021-10-12)<a class="headerlink" href="#version-123-2021-10-12" title="Permanent link"></a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Built-in themes now also support these languages:</p>
|
||||
<ul>
|
||||
<li>Simplified Chinese (<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2497" title="GitHub Issue mkdocs/mkdocs #2497">#2497</a>)</li>
|
||||
<li>Japanese (<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2525" title="GitHub Issue mkdocs/mkdocs #2525">#2525</a>)</li>
|
||||
<li>Brazilian Portuguese (<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2535" title="GitHub Issue mkdocs/mkdocs #2535">#2535</a>)</li>
|
||||
<li>Spanish (<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2545" title="GitHub Issue mkdocs/mkdocs #2545">#2545</a>, previously <a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2396" title="GitHub Issue mkdocs/mkdocs #2396">#2396</a>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>Third-party plugins will take precedence over built-in plugins with the same
|
||||
name (<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2591" title="GitHub Issue mkdocs/mkdocs #2591">#2591</a>)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Bugfix: Fix ability to load translations for some languages:
|
||||
core support (<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2565" title="GitHub Issue mkdocs/mkdocs #2565">#2565</a>) and search plugin support with fallbacks (<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2602" title="GitHub Issue mkdocs/mkdocs #2602">#2602</a>)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Bugfix (regression in 1.2): Prevent directory traversal in the dev server
|
||||
(<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2604" title="GitHub Issue mkdocs/mkdocs #2604">#2604</a>)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Bugfix (regression in 1.2): Prevent webserver warnings from being treated as
|
||||
a build failure in strict mode (<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2607" title="GitHub Issue mkdocs/mkdocs #2607">#2607</a>)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Bugfix: Correctly print colorful messages in the terminal on Windows (<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2606" title="GitHub Issue mkdocs/mkdocs #2606">#2606</a>)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Bugfix: Python version 3.10 was displayed incorrectly in <code>--version</code> (<a class="gh-link gh-issue" href="https://github.com/mkdocs/mkdocs/issues/2618" title="GitHub Issue mkdocs/mkdocs #2618">#2618</a>)</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Other small improvements; see
|
||||
<a href="https://github.com/mkdocs/mkdocs/compare/1.2.2...1.2.3">commit log</a>.</p>
|
||||
<h2 id="version-122-2021-07-18">Version 1.2.2 (2021-07-18)<a class="headerlink" href="#version-122-2021-07-18" title="Permanent link"></a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -384,7 +384,7 @@ be used to alter the site navigation.</p>
|
||||
<dl>
|
||||
<dd>
|
||||
<p>The <code>env</code> event is called after the Jinja template environment is created
|
||||
and can be used to alter the <a href="https://jinja.palletsprojects.com/en/master/api/#jinja2.Environment">Jinja environment</a>.</p>
|
||||
and can be used to alter the <a href="https://jinja.palletsprojects.com/en/latest/api/#jinja2.Environment">Jinja environment</a>.</p>
|
||||
<dl>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><strong>env:</strong> global Jinja environment</dd>
|
||||
@@ -626,7 +626,7 @@ class MyPlugin(BasePlugin):
|
||||
</code></pre>
|
||||
<h3 id="entry-point">Entry Point<a class="headerlink" href="#entry-point" title="Permanent link"></a></h3>
|
||||
<p>Plugins need to be packaged as Python libraries (distributed on PyPI separate
|
||||
from MkDocs) and each must register as a Plugin via a setuptools entry_point.
|
||||
from MkDocs) and each must register as a Plugin via a setuptools <code>entry_points</code>.
|
||||
Add the following to your <code>setup.py</code> script:</p>
|
||||
<pre><code class="language-python">entry_points={
|
||||
'mkdocs.plugins': [
|
||||
@@ -639,7 +639,7 @@ Add the following to your <code>setup.py</code> script:</p>
|
||||
(<code>from path.to.some_plugin import SomePluginClass</code>) where <code>SomePluginClass</code> is a
|
||||
subclass of <a href="#baseplugin">BasePlugin</a> which defines the plugin behavior. Naturally, multiple
|
||||
Plugin classes could exist in the same module. Simply define each as a separate
|
||||
entry_point.</p>
|
||||
entry point.</p>
|
||||
<pre><code class="language-python">entry_points={
|
||||
'mkdocs.plugins': [
|
||||
'featureA = path.to.my_plugins:PluginA',
|
||||
|
||||
@@ -595,7 +595,7 @@ following <code>extra</code> configuration:</p>
|
||||
{% endif %}
|
||||
</code></pre>
|
||||
<h2 id="template-filters">Template Filters<a class="headerlink" href="#template-filters" title="Permanent link"></a></h2>
|
||||
<p>In addition to Jinja's default filters, the following custom filters are
|
||||
<p>In addition to <a href="https://jinja.palletsprojects.com/en/latest/templates/#builtin-filters">Jinja's default filters</a>, the following custom filters are
|
||||
available to use in MkDocs templates:</p>
|
||||
<h3 id="url">url<a class="headerlink" href="#url" title="Permanent link"></a></h3>
|
||||
<p>Normalizes a URL. Absolute URLs are passed through unaltered. If the URL is
|
||||
@@ -749,9 +749,9 @@ setup(
|
||||
)
|
||||
</code></pre>
|
||||
<p>Fill in the URL, license, description, author and author email address.</p>
|
||||
<p>The name should follow the convention <code>mkdocs-themename</code> (like <code>mkdocs-
|
||||
bootstrap</code> and <code>mkdocs-bootswatch</code>), starting with MkDocs, using hyphens to
|
||||
separate words and including the name of your theme.</p>
|
||||
<p>The name should follow the convention <code>mkdocs-themename</code> (like
|
||||
<code>mkdocs-bootstrap</code> and <code>mkdocs-bootswatch</code>), starting with MkDocs, using
|
||||
hyphens to separate words and including the name of your theme.</p>
|
||||
<p>Most of the rest of the file can be left unedited. The last section we need to
|
||||
change is the entry_points. This is how MkDocs finds the theme(s) you are
|
||||
including in the package. The name on the left is the one that users will use
|
||||
@@ -822,7 +822,8 @@ templates to this list, the user cannot remove templates included in the
|
||||
theme's config.</p>
|
||||
<h4 id="extends">extends<a class="headerlink" href="#extends" title="Permanent link"></a></h4>
|
||||
<p>Defines a parent theme that this theme inherits from. The value should be
|
||||
the string name of the parent theme. Normal Jinja inheritance rules apply.</p>
|
||||
the string name of the parent theme. Normal <a href="https://jinja.palletsprojects.com/en/latest/templates/#template-inheritance">Jinja inheritance rules</a>
|
||||
apply.</p>
|
||||
</div>
|
||||
<p>Plugins may also define some options which allow the theme to inform a plugin
|
||||
about which set of plugin options it expects. See the documentation for any
|
||||
|
||||
@@ -201,7 +201,8 @@ configuration file. Start by reading the <a href="getting-started/">introductory
|
||||
href="user-guide/choosing-your-theme/#mkdocs">mkdocs</a> and <a
|
||||
href="user-guide/choosing-your-theme/#readthedocs">readthedocs</a>,
|
||||
select one of the third-party themes listed on the <a
|
||||
href="">MkDocs Themes</a> wiki page, or <a href="">build your
|
||||
href="https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes">MkDocs
|
||||
Themes</a> wiki page, or <a href="dev-guide/themes/">build your
|
||||
own</a>.
|
||||
</p>
|
||||
</div>
|
||||
@@ -335,6 +336,6 @@ configuration file. Start by reading the <a href="getting-started/">introductory
|
||||
</html>
|
||||
|
||||
<!--
|
||||
MkDocs version : 1.2.2
|
||||
Build Date UTC : 2021-07-18 19:23:32.181346+00:00
|
||||
MkDocs version : 1.2.3
|
||||
Build Date UTC : 2021-10-12 21:56:23.699016+00:00
|
||||
-->
|
||||
|
||||
@@ -30,7 +30,7 @@ $(document).ready(function() {
|
||||
$search_modal.modal();
|
||||
}
|
||||
|
||||
// make sure search input gets autofocus everytime modal opens.
|
||||
// make sure search input gets autofocus every time modal opens.
|
||||
$search_modal.on('shown.bs.modal', function() {
|
||||
$search_modal.find('#mkdocs-search-query').focus();
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
34
sitemap.xml
34
sitemap.xml
@@ -2,87 +2,87 @@
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/getting-started/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/about/contributing/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/about/license/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/about/release-notes/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/dev-guide/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/dev-guide/plugins/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/dev-guide/themes/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/dev-guide/translations/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/user-guide/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/user-guide/choosing-your-theme/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/user-guide/configuration/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/user-guide/customizing-your-theme/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/user-guide/deploying-your-docs/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/user-guide/installation/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/user-guide/localizing-your-theme/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.mkdocs.org/user-guide/writing-your-docs/</loc>
|
||||
<lastmod>2021-07-18</lastmod>
|
||||
<lastmod>2021-10-12</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
</urlset>
|
||||
BIN
sitemap.xml.gz
BIN
sitemap.xml.gz
Binary file not shown.
@@ -293,6 +293,9 @@ the key code for a given key.</p>
|
||||
<li><code>en</code>: English (default)</li>
|
||||
<li><code>fr</code>: French</li>
|
||||
<li><code>es</code>: Spanish</li>
|
||||
<li><code>ja</code>: Japanese</li>
|
||||
<li><code>pt_BR</code>: Portuguese (Brazil)</li>
|
||||
<li><code>zh_CN</code>: Simplified Chinese</li>
|
||||
</ul>
|
||||
<p>See the guide on <a href="../localizing-your-theme/">localizing your theme</a> for more information.</p>
|
||||
</li>
|
||||
@@ -374,6 +377,9 @@ tracking ID, which uses the <code>G-</code> format. See Google's documentation t
|
||||
<li><code>en</code>: English (default)</li>
|
||||
<li><code>fr</code>: French</li>
|
||||
<li><code>es</code>: Spanish</li>
|
||||
<li><code>ja</code>: Japanese</li>
|
||||
<li><code>pt_BR</code>: Portuguese (Brazil)</li>
|
||||
<li><code>zh_CN</code>: Simplified Chinese</li>
|
||||
</ul>
|
||||
<p>See the guide on <a href="../localizing-your-theme/">localizing your theme</a> for more information.</p>
|
||||
</li>
|
||||
|
||||
@@ -209,8 +209,9 @@
|
||||
<p>Guide to all available configuration settings.</p>
|
||||
<hr />
|
||||
<h2 id="introduction">Introduction<a class="headerlink" href="#introduction" title="Permanent link"></a></h2>
|
||||
<p>Project settings are always configured by using a YAML configuration file in the
|
||||
project directory named <code>mkdocs.yml</code>.</p>
|
||||
<p>Project settings are configured by default using a YAML configuration file in
|
||||
the project directory named <code>mkdocs.yml</code>. You can specify another path for it
|
||||
by using the <code>-f</code>/<code>--config-file</code> option (see <code>mkdocs build --help</code>).</p>
|
||||
<p>As a minimum, this configuration file must contain the <code>site_name</code> and
|
||||
<code>site_url</code> settings. All other settings are optional.</p>
|
||||
<h2 id="project-information">Project information<a class="headerlink" href="#project-information" title="Permanent link"></a></h2>
|
||||
@@ -228,7 +229,7 @@ MkDocs site will be within a subdirectory of a domain, be sure to include that
|
||||
subdirectory in the setting (<code>https://example.com/foo/</code>).</p>
|
||||
<p>This setting is also used for <code>mkdocs serve</code>: the server will be mounted onto a
|
||||
path taken from the path component of the URL, e.g. <code>some/page.md</code> will be
|
||||
served from <code>http://127.0.0.1:8000/foo/some/page/</code> to mimick the expected remote
|
||||
served from <code>http://127.0.0.1:8000/foo/some/page/</code> to mimic the expected remote
|
||||
layout.</p>
|
||||
<p><strong>default</strong>: <code>null</code></p>
|
||||
<h3 id="repo_url">repo_url<a class="headerlink" href="#repo_url" title="Permanent link"></a></h3>
|
||||
@@ -666,7 +667,7 @@ themes do). Set to <code>true</code> to enable.</p>
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>This option requires that <a href="https://nodejs.org/">Node.js</a> be installed and the command <code>node</code> be
|
||||
on the system path. If the call to <code>node</code> fails for any reason, a warning
|
||||
is issued and the build continues uninterupted. You may use the <code>--strict</code>
|
||||
is issued and the build continues uninterrupted. You may use the <code>--strict</code>
|
||||
flag when building to cause such a failure to raise an error instead.</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
<p>A detailed guide.</p>
|
||||
<hr />
|
||||
<h2 id="requirements">Requirements<a class="headerlink" href="#requirements" title="Permanent link"></a></h2>
|
||||
<p>MkDocs requires a recent version of <a href="https://www.python.org/">Python</a> and the the Python package
|
||||
<p>MkDocs requires a recent version of <a href="https://www.python.org/">Python</a> and the Python package
|
||||
manager, <a href="https://pip.readthedocs.io/en/stable/installing/">pip</a>, to be installed on your system.</p>
|
||||
<p>You can check if you already have these installed from the command line:</p>
|
||||
<pre><code class="language-bash">$ python --version
|
||||
|
||||
@@ -206,7 +206,7 @@ enable <code>i18n</code> (internationalization) support by installing <code>mkdo
|
||||
<pre><code class="language-bash">pip install mkdocs[i18n]
|
||||
</code></pre>
|
||||
<h2 id="supported-locales">Supported locales<a class="headerlink" href="#supported-locales" title="Permanent link"></a></h2>
|
||||
<p>In most cases a locale is designated by the ISO-639-1 (2-letter) abbreviation
|
||||
<p>In most cases a locale is designated by the <a href="https://en.wikipedia.org/wiki/ISO_639-1">ISO-639-1</a> (2-letter) abbreviation
|
||||
for your language. However, a locale may also include a territory (or region or
|
||||
county) code as well. The language and territory must be separated by an
|
||||
underscore. For example, some possible locales for English might include <code>en</code>,
|
||||
|
||||
Reference in New Issue
Block a user