mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added documentation for Disqus overrides
This commit is contained in:
parent
e55a82b96c
commit
7cf7ff98a2
@ -49,30 +49,6 @@ see on the current page when you scroll to the top. It's as simple as:
|
|||||||
hero: Metadata enables hero teaser texts
|
hero: Metadata enables hero teaser texts
|
||||||
```
|
```
|
||||||
|
|
||||||
### Overriding the title
|
|
||||||
|
|
||||||
The page title can be overridden on a per-document level:
|
|
||||||
|
|
||||||
``` markdown
|
|
||||||
title: Lorem ipsum dolor sit amet
|
|
||||||
```
|
|
||||||
|
|
||||||
This will set the `title` tag inside the document `head` for the current page
|
|
||||||
to the provided value. It will also override the default behavior of Material
|
|
||||||
for MkDocs which appends the site title using a dash as a separator to the page
|
|
||||||
title.
|
|
||||||
|
|
||||||
### Overriding the description
|
|
||||||
|
|
||||||
The page description can also be overridden on a per-document level:
|
|
||||||
|
|
||||||
``` yaml
|
|
||||||
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
|
|
||||||
```
|
|
||||||
|
|
||||||
This will set the `meta` tag containing the site description inside the
|
|
||||||
document `head` for the current page to the provided value.
|
|
||||||
|
|
||||||
### Linking sources
|
### Linking sources
|
||||||
|
|
||||||
When a document is related to a specific set of source files and the `repo_url`
|
When a document is related to a specific set of source files and the `repo_url`
|
||||||
@ -98,3 +74,46 @@ Result:
|
|||||||
See the [source][2] section for the resulting output.
|
See the [source][2] section for the resulting output.
|
||||||
|
|
||||||
[2]: #__source
|
[2]: #__source
|
||||||
|
|
||||||
|
### Overrides
|
||||||
|
|
||||||
|
#### Page title
|
||||||
|
|
||||||
|
The page title can be overridden on a per-document level:
|
||||||
|
|
||||||
|
``` markdown
|
||||||
|
title: Lorem ipsum dolor sit amet
|
||||||
|
```
|
||||||
|
|
||||||
|
This will set the `title` tag inside the document `head` for the current page
|
||||||
|
to the provided value. It will also override the default behavior of Material
|
||||||
|
for MkDocs which appends the site title using a dash as a separator to the page
|
||||||
|
title.
|
||||||
|
|
||||||
|
#### Page description
|
||||||
|
|
||||||
|
The page description can also be overridden on a per-document level:
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
|
||||||
|
```
|
||||||
|
|
||||||
|
This will set the `meta` tag containing the site description inside the
|
||||||
|
document `head` for the current page to the provided value.
|
||||||
|
|
||||||
|
#### Disqus
|
||||||
|
|
||||||
|
As describe in the [getting started guide][3], the Disqus comments section can
|
||||||
|
be enabled on a per-document level:
|
||||||
|
|
||||||
|
``` markdown
|
||||||
|
disqus: your-shortname
|
||||||
|
```
|
||||||
|
|
||||||
|
Disqus can be disabled for a specific page by setting it to an empty value:
|
||||||
|
|
||||||
|
``` markdown
|
||||||
|
disqus:
|
||||||
|
```
|
||||||
|
|
||||||
|
[3]: ../getting-started.md#disqus
|
||||||
|
@ -593,11 +593,14 @@ automatically included.
|
|||||||
`site_url` value must be set in `mkdocs.yml` for the Disqus integration to
|
`site_url` value must be set in `mkdocs.yml` for the Disqus integration to
|
||||||
load properly.
|
load properly.
|
||||||
|
|
||||||
|
Disqus can also be enabled or disabled for specific pages using [Metadata][23].
|
||||||
|
|
||||||
[22]: https://disqus.com
|
[22]: https://disqus.com
|
||||||
|
[23]: extensions/metadata.md#disqus
|
||||||
|
|
||||||
## Extensions
|
## Extensions
|
||||||
|
|
||||||
MkDocs supports several [Markdown extensions][23]. The following extensions
|
MkDocs supports several [Markdown extensions][24]. The following extensions
|
||||||
are not enabled by default (see the link for which are enabled by default)
|
are not enabled by default (see the link for which are enabled by default)
|
||||||
but highly recommended, so they should be switched on at all times:
|
but highly recommended, so they should be switched on at all times:
|
||||||
|
|
||||||
@ -613,20 +616,20 @@ markdown_extensions:
|
|||||||
For more information, see the following list of extensions supported by the
|
For more information, see the following list of extensions supported by the
|
||||||
Material theme including more information regarding installation and usage:
|
Material theme including more information regarding installation and usage:
|
||||||
|
|
||||||
* [Admonition][24]
|
* [Admonition][25]
|
||||||
* [Codehilite][25]
|
* [Codehilite][26]
|
||||||
* [Footnotes][26]
|
* [Footnotes][27]
|
||||||
* [Metadata][27]
|
* [Metadata][28]
|
||||||
* [Permalinks][28]
|
* [Permalinks][29]
|
||||||
* [PyMdown Extensions][29]
|
* [PyMdown Extensions][30]
|
||||||
|
|
||||||
[23]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
|
[24]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
|
||||||
[24]: extensions/admonition.md
|
[25]: extensions/admonition.md
|
||||||
[25]: extensions/codehilite.md
|
[26]: extensions/codehilite.md
|
||||||
[26]: extensions/footnotes.md
|
[27]: extensions/footnotes.md
|
||||||
[27]: extensions/metadata.md
|
[28]: extensions/metadata.md
|
||||||
[28]: extensions/permalinks.md
|
[29]: extensions/permalinks.md
|
||||||
[29]: extensions/pymdown.md
|
[30]: extensions/pymdown.md
|
||||||
|
|
||||||
## Full example
|
## Full example
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user