Skip to content

Commit 6acd637

Browse files
committed
Updated documentation
1 parent a0ff739 commit 6acd637

11 files changed

+97
-115
lines changed

docs/customization.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ directory:
152152
MkDocs will now use the new partial when rendering the theme. This can be done
153153
with any file.
154154

155-
### Overriding blocks <small>recommended</small> { data-toc-label="Overriding blocks" }
155+
### Overriding blocks <small>recommended</small> { #overriding-blocks data-toc-label="Overriding blocks" }
156156

157157
Besides overriding partials, it's also possible to override (and extend)
158158
_template blocks_, which are defined inside the templates and wrap specific
@@ -216,7 +216,7 @@ with Material for MkDocs_ hint in the footer, add the following line to
216216
{% extends "base.html" %}
217217
218218
{% set extracopyright %}
219-
<!-- Add your additional information here -->
219+
<!-- Add additional copyright information here -->
220220
{% endset %}
221221
```
222222

docs/deprecations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ templates can be shared among multiple pages:
124124
{% endblock %}
125125
```
126126

127-
[5]: customization.md#overriding-blocks-recommended
127+
[5]: customization.md#overriding-blocks
128128
[6]: customization.md#extending-the-theme
129129

130130
## Docker image

docs/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In case you're running into problems, consult the [troubleshooting][4] section.
1919

2020
## Installation
2121

22-
### with pip <small>recommended</small> { data-toc-label="with pip" }
22+
### with pip <small>recommended</small> { #with-pip data-toc-label="with pip" }
2323

2424
Material for MkDocs can be installed with `pip`:
2525

docs/reference/meta-tags.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ extra:
105105
#### on all pages
106106
107107
In order to add custom `meta` tags to your document, you can [extend the theme
108-
][theme extension] and [override the `extrahead` block][override block],
108+
][theme extension] and [override the `extrahead` block][overriding blocks],
109109
e.g. to add indexing policies for search engines via the `robots` property:
110110

111111
``` html
@@ -116,7 +116,7 @@ e.g. to add indexing policies for search engines via the `robots` property:
116116
{% endblock %}
117117
```
118118

119-
[override block]: ../customization.md#overriding-blocks-recommended
119+
[overriding blocks]: ../customization.md#overriding-blocks
120120

121121
#### on a single page
122122

docs/setup/adding-a-comment-system.md

+21-28
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,43 @@ template: overrides/main.html
44

55
# Adding a comment system
66

7-
Material for MkDocs is natively integrated with [Disqus][1], a comment system
8-
that provides a wide range of features like social integrations, user profiles,
9-
as well as spam and moderation tools. Of course, other comment systems can be
7+
Material for MkDocs is natively integrated with [Disqus], a comment system that
8+
provides a wide range of features like social integrations, user profiles, as
9+
well as spam and moderation tools. Of course, other comment systems can be
1010
integrated, too.
1111

12-
[1]: https://disqus.com/
12+
[Disqus]: https://disqus.com/
1313

1414
## Configuration
1515

1616
### Disqus
1717

18-
[:octicons-file-code-24: Source][2] ·
18+
[:octicons-tag-24: 1.1.0][Disqus support] ·
1919
:octicons-milestone-24: Default: _none_
2020

21-
First, ensure you've set [`site_url`][3] in `mkdocs.yml`. Then, to integrate
22-
Material for MkDocs with [Disqus][1], create an account and a site giving you a
23-
[shortname][4], and add it to `mkdocs.yml`:
21+
First, ensure you've set [`site_url`][site_url] in `mkdocs.yml`. Then, to
22+
integrate Material for MkDocs with [Disqus], create an account and a site
23+
giving you a [shortname], and add it to `mkdocs.yml`:
2424

2525
``` yaml
2626
extra:
2727
disqus: <shortname>
2828
```
2929
30-
This will insert a comment system on _every page, except the index page_.
30+
This will insert a comment system on every page, except the index page.
3131
32-
[2]: https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/integrations/disqus.html
33-
[3]: https://www.mkdocs.org/user-guide/configuration/#site_url
34-
[4]: https://help.disqus.com/en/articles/1717111-what-s-a-shortname
32+
[Disqus support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.1.0
33+
[site_url]: https://www.mkdocs.org/user-guide/configuration/#site_url
34+
[shortname]: https://help.disqus.com/en/articles/1717111-what-s-a-shortname
3535
3636
## Customization
3737
3838
### Selective integration
3939
40-
[:octicons-file-code-24: Source][2] ·
41-
:octicons-note-24: Metadata ·
42-
:octicons-mortar-board-24: Difficulty: _easy_
40+
When [Metadata] is enabled, Disqus can be enabled or disabled for a document
41+
with custom front matter. Add the following lines at the top of a Markdown file:
4342
44-
If the [Metadata][5] extension is enabled, you can disable or enable Disqus for
45-
specific pages by adding the following to the front matter of a page:
46-
47-
=== "Enable Disqus"
43+
=== ":octicons-check-circle-fill-16: Enabled"
4844
4945
``` bash
5046
---
@@ -55,7 +51,7 @@ specific pages by adding the following to the front matter of a page:
5551
...
5652
```
5753

58-
=== "Disable Disqus"
54+
=== ":octicons-skip-16: Disabled"
5955

6056
``` bash
6157
---
@@ -66,15 +62,13 @@ specific pages by adding the following to the front matter of a page:
6662
...
6763
```
6864

69-
[5]: ../../reference/meta-tags/#metadata
65+
[Metadata]: extensions/python-markdown.md#metadata
7066

7167
### Other comment systems
7268

73-
[:octicons-file-code-24: Source][6] ·
74-
:octicons-mortar-board-24: Difficulty: _easy_
75-
7669
In order to integrate another JavaScript-based comment system provider, you can
77-
[extend the theme][7] and [override the `disqus` block][8]:
70+
[extend the theme], create a new `main.html` in `overrides` and [override the
71+
`disqus` block][overriding blocks]:
7872

7973
``` html
8074
{% extends "base.html" %}
@@ -84,6 +78,5 @@ In order to integrate another JavaScript-based comment system provider, you can
8478
{% endblock %}
8579
```
8680

87-
[6]: https://github.com/squidfunk/mkdocs-material/blob/master/src/base.html
88-
[7]: ../customization.md#extending-the-theme
89-
[8]: ../customization.md#overriding-blocks-recommended
81+
[extend the theme]: ../customization.md#extending-the-theme
82+
[overriding blocks]: ../customization.md#overriding-blocks

docs/setup/setting-up-site-analytics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ and extendable [cookie consent][extra.consent].
2020
:octicons-milestone-24: Default: _none_
2121

2222
Material for MkDocs integrates with both, Google Analytics 4 and the now phasing
23-
out Universal Analytics (`UA-*`). Depending on the property prefix, add the
23+
out Universal Analytics. Depending on the given property prefix, add the
2424
following lines to `mkdocs.yml`:
2525

2626
=== ":material-google-analytics: Google Analytics 4"

docs/setup/setting-up-site-search.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Use them at your own risk._
150150
:octicons-beaker-24: Experimental ·
151151
[:octicons-tag-24: 7.2.0][Search suggestions support]
152152

153-
When _search suggestions_ are enabled, the search will display the likeliest
153+
When search suggestions are enabled, the search will display the likeliest
154154
completion for the last word, saving the user many key strokes by accepting the
155155
suggestion with the ++arrow-right++ key.
156156

@@ -177,7 +177,7 @@ Searching for [:octicons-search-24: search su][9] yields ^^search suggestions^^
177177
:octicons-beaker-24: Experimental ·
178178
[:octicons-tag-24: 7.2.0][Search highlighting support]
179179

180-
When _search highlighting_ is enabled and a user clicks on a search result,
180+
When search highlighting is enabled and a user clicks on a search result,
181181
Material for MkDocs will highlight all occurrences after following the link.
182182
Add the following lines to `mkdocs.yml`:
183183

@@ -202,7 +202,7 @@ Searching for [:octicons-search-24: code blocks][12] yields:
202202
:octicons-beaker-24: Experimental ·
203203
[:octicons-tag-24: 7.2.0][Search highlighting support]
204204

205-
When _search sharing_ is activated, a :material-share-variant: share button is
205+
When search sharing is activated, a :material-share-variant: share button is
206206
rendered next to the reset button, which allows to deep link to the current
207207
search query and result. Add the following lines to `mkdocs.yml`:
208208

@@ -439,7 +439,7 @@ and must return the processed query string to be submitted to the search index.
439439

440440
[23]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/transform/index.ts
441441
[24]: ../customization.md#extending-the-theme
442-
[25]: ../customization.md#overriding-blocks-recommended
442+
[25]: ../customization.md#overriding-blocks
443443

444444
### Custom search
445445

docs/setup/setting-up-social-cards.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ MkDocs can generate beautiful social cards automatically, using the [colors]
3030

3131
The built-in social cards plugin generates a social preview image for every page
3232
and adds the necessary meta tags, so it's displayed on social media when shared.
33-
Enable it via `mkdocs.yml`:
33+
First, ensure you've set [`site_url`][site_url] in `mkdocs.yml`.[^2] Then, add
34+
the following lines to `mkdocs.yml` to enable the plugin:
35+
36+
[^2]:
37+
When using this plugin, the [`site_url`][site_url] setting is mandatory, as
38+
social preview images don't work with relative URLs.
3439

3540
``` yaml
3641
plugins:
@@ -83,12 +88,14 @@ The following configuration options are available:
8388
```
8489

8590
[Insiders]: ../insiders/index.md
91+
[site_url]: https://www.mkdocs.org/user-guide/configuration/#site_url
8692
[setting up site analytics]: setting-up-site-analytics.md
8793
[Social cards preview]: ../assets/screenshots/social-cards.png
8894
[Twitter's Card validator]: https://cards-dev.twitter.com/validator
95+
[meta tags]: #meta-tags
8996
[CSS color keywords]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#color_keywords
9097

91-
#### Caching <small>recommended</small> { data-toc-label="Caching" }
98+
#### Caching <small>recommended</small> { #caching data-toc-label="Caching" }
9299

93100
The [built-in social cards plugin] automatically fetches the fonts you define
94101
in `mkdocs.yml` from Google Fonts, and uses them to render the text that is

docs/setup/setting-up-the-footer.md

+23-27
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ configured via `mkdocs.yml`.
1515

1616
### Social links
1717

18-
:octicons-hash-24: Setting ·
19-
:octicons-milestone-24: Default: _none_ ·
20-
[:octicons-tag-24: 1.0.0][Social links support]
18+
[:octicons-tag-24: 1.0.0][Social links support] ·
19+
:octicons-milestone-24: Default: _none_
2120

2221
Social links are rendered next to the copyright notice as part of the
2322
footer of your project documentation. Add a list of social links in `mkdocs.yml`
@@ -36,7 +35,8 @@ For each entry, the following settings are available:
3635

3736
: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: Required –
3837
This field must point to a valid icon path referencing [any icon bundled
39-
with the theme][2], or the build will not succeed. Some popular choices:
38+
with the theme][custom icons], or the build will not succeed. Some popular
39+
choices:
4040

4141
* :fontawesome-brands-behance: – `fontawesome/brands/behance`
4242
* :fontawesome-brands-docker: – `fontawesome/brands/docker`
@@ -50,16 +50,15 @@ For each entry, the following settings are available:
5050
* :fontawesome-brands-twitter: – `fontawesome/brands/twitter`
5151

5252
[Social links support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0
53-
[1]: https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/social.html
54-
[2]: https://github.com/squidfunk/mkdocs-material/tree/master/material/.icons
53+
[custom icons]: https://github.com/squidfunk/mkdocs-material/tree/master/material/.icons
5554

5655
`link`{ #social-link }
5756

5857
: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: Required –
5958
This field must contain a valid relative or absolute URL including the URI
6059
scheme. All URI schemes are supported, including `mailto` and `bitcoin`:
6160

62-
=== "Twitter"
61+
=== ":fontawesome-brands-twitter: Twitter"
6362

6463
``` yaml
6564
extra:
@@ -68,7 +67,7 @@ For each entry, the following settings are available:
6867
link: https://twitter.com/squidfunk
6968
```
7069

71-
=== "Email address"
70+
=== ":octicons-mail-16: Email"
7271

7372
``` yaml
7473
extra:
@@ -93,9 +92,8 @@ For each entry, the following settings are available:
9392

9493
### Copyright notice
9594

96-
:octicons-hash-24: Setting ·
97-
:octicons-milestone-24: Default: _none_ ·
98-
[:octicons-tag-24: 0.1.0][Copyright notice support]
95+
[:octicons-tag-24: 0.1.0][Copyright notice support] ·
96+
:octicons-milestone-24: Default: _none_
9997

10098
A custom copyright banner can be rendered as part of the footer, which is
10199
displayed next to the social links. It can be defined as part of `mkdocs.yml`:
@@ -109,9 +107,8 @@ copyright: Copyright &copy; 2016 - 2020 Martin Donath
109107

110108
### Generator notice
111109

112-
:octicons-hash-24: Setting ·
113-
:octicons-milestone-24: Default: `true` ·
114-
[:octicons-tag-24: 7.3.0][Generator notice support]
110+
[:octicons-tag-24: 7.3.0][Generator notice support] ·
111+
:octicons-milestone-24: Default: `true`
115112

116113
The footer displays a _Made with Material for MkDocs_ notice to denote how
117114
the site was generated. The notice can be removed with the following setting
@@ -127,25 +124,24 @@ extra:
127124
The subtle __Made with Material for MkDocs__ hint in the footer is one of
128125
the reasons why this project is so popular, as it tells the user how the
129126
site is generated, helping new users to discover this project. Before
130-
removing it, please consider that you're enjoying the benefits of
131-
@squidfunk's work for free, as this project is Open Source and has a
132-
permissive license. Thousands of hours went into this project, most of them
133-
without any financial return. Thus, if you remove this notice, please
134-
consider [sponsoring][4] the project. __Thank you__
135-
:octicons-heart-fill-24:{ .mdx-heart .mdx-insiders }
127+
removing please consider that you're enjoying the benefits of @squidfunk's
128+
work for free, as this project is Open Source and has a permissive license.
129+
Thousands of hours went into this project, most of them
130+
without any financial return.
131+
132+
Thus, if you remove this notice, please consider [sponsoring][Insiders] the
133+
project. __Thank you__ :octicons-heart-fill-24:{ .mdx-heart .mdx-insiders }
136134

137135
[Generator notice support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.3.0
136+
[Insiders]: ../insiders/index.md
138137

139138
## Customization
140139

141140
### Custom icons
142141

143-
[:octicons-file-code-24: Source][2] ·
144-
:octicons-mortar-board-24: Difficulty: _easy_
145-
146-
The social links feature uses the standard [icon integration][5] of Material for
142+
The social links feature uses the standard [icon integration] of Material for
147143
MkDocs. If you want to use custom icons, follow the guide explaining how to
148-
add [additional icons][6].
144+
add [additional icons].
149145

150-
[5]: changing-the-logo-and-icons.md#icons
151-
[6]: changing-the-logo-and-icons.md#additional-icons
146+
[icon integration]: extensions/python-markdown-extensions.md#emoji
147+
[additional icons]: changing-the-logo-and-icons.md#additional-icons

0 commit comments

Comments
 (0)