mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Merge branch 'master' into feature/blog
This commit is contained in:
commit
cc724f77d4
@ -113,6 +113,8 @@ In order to add custom `meta` tags to your document, you can [extend the theme
|
|||||||
policies for search engines:
|
policies for search engines:
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
<meta property="robots" content="noindex, nofollow" />
|
<meta property="robots" content="noindex, nofollow" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -127,6 +129,8 @@ values for different pages, you can use the `page.meta` object inside your
|
|||||||
template override, e.g.:
|
template override, e.g.:
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
{% if page and page.meta and page.meta.robots %}
|
{% if page and page.meta and page.meta.robots %}
|
||||||
<meta property="robots" content="{{ page.meta.robots }}" />
|
<meta property="robots" content="{{ page.meta.robots }}" />
|
||||||
|
@ -77,6 +77,8 @@ In order to integrate another JavaScript-based comment system provider, you can
|
|||||||
[extend the theme][7] and [override the `disqus` block][8]:
|
[extend the theme][7] and [override the `disqus` block][8]:
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block disqus %}
|
{% block disqus %}
|
||||||
<!-- Add custom comment system integration here -->
|
<!-- Add custom comment system integration here -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -180,9 +180,6 @@ Searching for [:octicons-search-24: ^^code blocks^^][12] yields:
|
|||||||
|
|
||||||
[![Search highlighting][13]][13]
|
[![Search highlighting][13]][13]
|
||||||
|
|
||||||
</figcaption>
|
|
||||||
</figure>
|
|
||||||
|
|
||||||
[11]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/components/search/highlight/index.ts
|
[11]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/components/search/highlight/index.ts
|
||||||
[12]: ../reference/code-blocks.md?h=code+blocks
|
[12]: ../reference/code-blocks.md?h=code+blocks
|
||||||
[13]: ../assets/screenshots/search-highlighting.png
|
[13]: ../assets/screenshots/search-highlighting.png
|
||||||
@ -312,6 +309,8 @@ customize the `transform` function, you can do this by [overriding the
|
|||||||
`config` block][24]:
|
`config` block][24]:
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block config %}
|
{% block config %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script>
|
<script>
|
||||||
|
@ -42,6 +42,8 @@ an announcement bar, [extend the theme][4] and [override the `announce`
|
|||||||
block][5], which is empty by default:
|
block][5], which is empty by default:
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block announce %}
|
{% block announce %}
|
||||||
<!-- Add your announcement here, including arbitrary HTML -->
|
<!-- Add your announcement here, including arbitrary HTML -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -76,6 +76,8 @@ visits any other version than the latest version. Using [theme extension][8],
|
|||||||
you can [define the `outdated` block][9]:
|
you can [define the `outdated` block][9]:
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block outdated %}
|
{% block outdated %}
|
||||||
You're not viewing the latest version.
|
You're not viewing the latest version.
|
||||||
<a href="{{ '../' ~ base_url }}"> <!-- (1) -->
|
<a href="{{ '../' ~ base_url }}"> <!-- (1) -->
|
||||||
|
Loading…
Reference in New Issue
Block a user