Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mkdocs-material
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Janne Mareike Koschinski
mkdocs-material
Commits
7cf7ff98
Commit
7cf7ff98
authored
7 years ago
by
squidfunk
Committed by
Martin Donath
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation for Disqus overrides
parent
e55a82b9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/extensions/metadata.md
+37
-18
37 additions, 18 deletions
docs/extensions/metadata.md
docs/getting-started.md
+18
-15
18 additions, 15 deletions
docs/getting-started.md
with
55 additions
and
33 deletions
docs/extensions/metadata.md
+
37
−
18
View file @
7cf7ff98
...
@@ -49,7 +49,35 @@ see on the current page when you scroll to the top. It's as simple as:
...
@@ -49,7 +49,35 @@ 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
### Linking sources
When a document is related to a specific set of source files and the
`repo_url`
is defined inside the project's
`mkdocs.yml`
, the files can be linked using the
`source`
key:
```
markdown
source: file.js
```
The filename is appended to the
`repo_url`
set in your
`mkdocs.yml`
, but can
be prefixed with a
`path`
to ensure correct path resolving:
Example:
```
markdown
path: tree/master/docs/extensions
source: metadata.md
```
Result:
See the
[
source
][
2
]
section for the resulting output.
[
2
]:
#__source
### Overrides
#### Page title
The page title can be overridden on a per-document level:
The page title can be overridden on a per-document level:
...
@@ -62,7 +90,7 @@ to the provided value. It will also override the default behavior of Material
...
@@ -62,7 +90,7 @@ 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
for MkDocs which appends the site title using a dash as a separator to the page
title.
title.
###
Overriding th
e description
###
# Pag
e description
The page description can also be overridden on a per-document level:
The page description can also be overridden on a per-document level:
...
@@ -73,28 +101,19 @@ description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
...
@@ -73,28 +101,19 @@ description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
This will set the
`meta`
tag containing the site description inside the
This will set the
`meta`
tag containing the site description inside the
document
`head`
for the current page to the provided value.
document
`head`
for the current page to the provided value.
###
Linking source
s
###
# Disqu
s
When a document is related to a specific set of source files and the
`repo_url`
As describe in the
[
getting started guide
][
3
]
, the Disqus comments section can
is defined inside the project's
`mkdocs.yml`
, the files can be linked using the
be enabled on a per-document level:
`source`
key:
```
markdown
```
markdown
source: file.js
disqus: your-shortname
```
```
The filename is appended to the
`repo_url`
set in your
`mkdocs.yml`
, but can
Disqus can be disabled for a specific page by setting it to an empty value:
be prefixed with a
`path`
to ensure correct path resolving:
Example:
```
markdown
```
markdown
path: tree/master/docs/extensions
disqus:
source: metadata.md
```
```
Result:
[
3
]:
../getting-started.md#disqus
See the
[
source
][
2
]
section for the resulting output.
[
2
]:
#__source
This diff is collapsed.
Click to expand it.
docs/getting-started.md
+
18
−
15
View file @
7cf7ff98
...
@@ -593,11 +593,14 @@ automatically included.
...
@@ -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
][
2
3
]
. The following extensions
MkDocs supports several
[
Markdown extensions
][
2
4
]
. 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:
...
@@ -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
][
2
4
]
*
[
Admonition
][
2
5
]
*
[
Codehilite
][
2
5
]
*
[
Codehilite
][
2
6
]
*
[
Footnotes
][
2
6
]
*
[
Footnotes
][
2
7
]
*
[
Metadata
][
2
7
]
*
[
Metadata
][
2
8
]
*
[
Permalinks
][
2
8
]
*
[
Permalinks
][
2
9
]
*
[
PyMdown Extensions
][
29
]
*
[
PyMdown Extensions
][
30
]
[
2
3
]:
http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
[
2
4
]:
http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
[
2
4
]:
extensions/admonition.md
[
2
5
]:
extensions/admonition.md
[
2
5
]:
extensions/codehilite.md
[
2
6
]:
extensions/codehilite.md
[
2
6
]:
extensions/footnotes.md
[
2
7
]:
extensions/footnotes.md
[
2
7
]:
extensions/metadata.md
[
2
8
]:
extensions/metadata.md
[
2
8
]:
extensions/permalinks.md
[
2
9
]:
extensions/permalinks.md
[
29
]:
extensions/pymdown.md
[
30
]:
extensions/pymdown.md
## Full example
## Full example
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment