Skip to content

Commit 6f2ee54

Browse files
committed
2 parents a26863a + f9d5c67 commit 6f2ee54

File tree

83 files changed

+6889
-3406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+6889
-3406
lines changed

.editorconfig

-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ end_of_line = lf
3030
insert_final_newline = true
3131
trim_trailing_whitespace = true
3232

33-
# Markdown
34-
[*.md]
35-
trim_trailing_whitespace = false
36-
3733
# Python
3834
[*.py]
3935
indent_style = space

Dockerfile

+2-5
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,8 @@ RUN \
6060
pip install --no-cache-dir . \
6161
&& \
6262
if [ "${WITH_PLUGINS}" = "true" ]; then \
63-
pip install --no-cache-dir \
64-
"mkdocs-minify-plugin~=0.7" \
65-
"mkdocs-redirects~=1.2" \
66-
"pillow~=9.4" \
67-
"cairosvg~=2.6"; \
63+
pip install --no-cache-dir mkdocs-material[recommended] \
64+
pip install --no-cache-dir mkdocs-material[imaging]; \
6865
fi \
6966
&& \
7067
if [ -e user-requirements.txt ]; then \

docs/blog/posts/blog-support-just-landed.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque
168168
tellus id elit ultricies, vel finibus erat cursus.
169169
```
170170

171-
1. If you mark a post as a [draft], a red marker appears next to the post date
172-
on index pages. When the site is built, drafts are not included in the
173-
output. [This behavior can be changed], e.g. for rendering drafts when
171+
1. If you mark a post as a [draft], a red marker appears next to the post date
172+
on index pages. When the site is built, drafts are not included in the
173+
output. [This behavior can be changed], e.g. for rendering drafts when
174174
building deploy previews.
175175

176176
When you spin up the [live preview server], you should be greeted by your first
@@ -233,7 +233,7 @@ Some ideas already proposed by users:
233233
part of a series, a list with links to all other posts should be included in
234234
the post's content.
235235

236-
- __Author indexes__: Besides [archive] and [category] indexes, authors should
236+
- __Author indexes__: Besides [archive] and [category] indexes, authors should
237237
be able to create per-author indexes, which list all posts linked to an
238238
author. Additionally, a profile should be created for each author and linked
239239
from posts.

docs/blog/posts/chinese-search-support.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ date: 2022-05-05
33
authors: [squidfunk]
44
title: Chinese search support
55
description: >
6-
Insiders adds Chinese language support for the built-in search plugin – a
6+
Insiders adds Chinese language support for the built-in search plugin – a
77
feature that has been requested many times
88
categories:
99
- Search
1010
links:
1111
- blog/posts/search-better-faster-smaller.md
12-
- setup/setting-up-site-search.md#chinese-language-support
12+
- plugins/search.md#segmentation
1313
- insiders/index.md#how-to-become-a-sponsor
1414
---
1515

1616
# Chinese search support – 中文搜索​支持
1717

18-
__Insiders adds experimental Chinese language support for the [built-in search
18+
__Insiders adds experimental Chinese language support for the [built-in search
1919
plugin] – a feature that has been requested for a long time given the large
2020
number of Chinese users.__
2121

2222
After the United States and Germany, the third-largest country of origin of
2323
Material for MkDocs users is China. For a long time, the [built-in search plugin]
24-
didn't allow for proper segmentation of Chinese characters, mainly due to
24+
didn't allow for proper segmentation of Chinese characters, mainly due to
2525
missing support in [lunr-languages] which is used for search tokenization and
2626
stemming. The latest Insiders release adds long-awaited Chinese language support
2727
for the built-in search plugin, something that has been requested by many users.
@@ -49,8 +49,8 @@ through the segmenter. You can install [jieba] with:
4949
pip install jieba
5050
```
5151

52-
The next step is only required if you specified the [`separator`][separator]
53-
configuration in `mkdocs.yml`. Text is segmented with [zero-width whitespace]
52+
The next step is only required if you specified the [`separator`][separator]
53+
configuration in `mkdocs.yml`. Text is segmented with [zero-width whitespace]
5454
characters, so it renders exactly the same in the search modal. Adjust
5555
`mkdocs.yml` so that the [`separator`][separator] includes the `\u200b`
5656
character:
@@ -65,14 +65,14 @@ That's all that is necessary.
6565
6666
## Usage
6767
68-
If you followed the instructions in the configuration guide, Chinese words will
68+
If you followed the instructions in the configuration guide, Chinese words will
6969
now be tokenized using [jieba]. Try searching for
70-
[:octicons-search-24: 支持][q=支持] to see how it integrates with the
70+
[:octicons-search-24: 支持][q=支持] to see how it integrates with the
7171
built-in search plugin.
7272
7373
---
7474
75-
Note that this is an experimental feature, and I, @squidfunk, am not
75+
Note that this is an experimental feature, and I, @squidfunk, am not
7676
proficient in Chinese (yet?). If you find a bug or think something can be
7777
improved, please [open an issue].
7878

docs/blog/posts/excluding-content-from-search.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ search:
119119
exclude: true
120120
---
121121
122-
# Document title
122+
# Page title
123123
...
124124
```
125125

@@ -133,7 +133,7 @@ filtered by the search plugin before the page is rendered:
133133
=== ":octicons-file-code-16: `docs/page.md`"
134134
135135
``` markdown
136-
# Document title
136+
# Page title
137137
138138
## Section 1
139139
@@ -173,7 +173,7 @@ supported by the [Attribute Lists] extension:
173173
=== ":octicons-file-code-16: `docs/page.md`"
174174
175175
``` markdown
176-
# Document title
176+
# Page title
177177
178178
The content of this block is included
179179

docs/blog/posts/search-better-faster-smaller.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ which creates and manages the [lunr] search index. When search is initialized,
176176
the following steps are taken:
177177
178178
[^1]:
179-
Prior to :octicons-tag-24: 5.0.0, search was carried out in the main thread
180-
which locked up the browser, rendering it unusable. This problem was first
181-
reported in #904 and, after some back and forth, fixed and released in
182-
:octicons-tag-24: 5.0.0.
179+
Prior to <!-- md:version 5.0.0 -->, search was carried out in the main
180+
thread which locked up the browser, rendering it unusable. This problem was
181+
first reported in #904 and, after some back and forth, fixed and released in
182+
<!-- md:version 5.0.0 -->.
183183
184184
1. __Linking sections with pages__: The search index is parsed, and each
185185
section is linked to its parent page. The parent page itself is _not
@@ -196,7 +196,7 @@ the following steps are taken:
196196
> can achieve with a tokenizer that is capable of separating strings with
197197
> lookahead.
198198
199-
1. __Indexing__: As a final step, each section is indexed. When querying the
199+
3. __Indexing__: As a final step, each section is indexed. When querying the
200200
index, if a search query includes one of the tokens as returned by step 2.,
201201
the section is considered to be part of the search result and passed to the
202202
main thread.

docs/browser-support.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,4 @@ the following older browser versions might work with some additional effort:
6464
- :fontawesome-brands-internet-explorer: __Internet Explorer__ - no support,
6565
mainly due to missing support for [custom properties]. The last version of
6666
Material for MkDocs to support Internet Explorer is
67-
[:octicons-tag-24: 4.6.3][IE support].
68-
69-
[IE support]: https://github.com/squidfunk/mkdocs-material/releases/tag/4.6.3
67+
<!-- md:version 4.6.3 -->.

docs/contributing/reporting-a-bug.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ summary of the issue, so the impact and severity of the bug you want to report
148148
can be inferred from the title.
149149

150150
| <!-- --> | Example |
151-
| -------- | -------- |
151+
| -------- | -------- |
152152
| :material-check:{ style="color: #4DB6AC" } __Clear__ | Built-in `typeset` plugin changes precedence of nav title over `h1`
153153
| :material-close:{ style="color: #EF5350" } __Wordy__ | The built-in `typeset` plugin changes the precedence of the nav title over the document headline
154154
| :material-close:{ style="color: #EF5350" } __Unclear__ | Title does not work
@@ -235,17 +235,17 @@ make it easier for us maintainers to improve the documentation.
235235
### Reproduction
236236

237237
A minimal reproduction is at the heart of every well-written bug report, as
238-
it allows us maintainers to quickly recreate the necessary conditions to inspect
239-
the bug and quickly find its root cause. It's a proven fact that issues with
240-
concise and small reproductions can be fixed much faster.
238+
it allows us maintainers to instantly recreate the necessary conditions to
239+
inspect the bug to quickly find its root cause. It's a proven fact that issues
240+
with concise and small reproductions can be fixed much faster.
241241

242242
[:material-bug:&nbsp; Create a reproduction][Create reproduction]{ .md-button .md-button--primary }
243243

244244
---
245245

246-
After you have created the reproduction, you should have a .zip file, ideally not
247-
larger than 1 MB. Just drag and drop the .zip file into this field, which will
248-
automatically upload it to GitHub.
246+
After you have created the reproduction, you should have a `.zip` file, ideally
247+
not larger than 1 MB. Just drag and drop the `.zip` file into this field, which
248+
will automatically upload it to GitHub.
249249

250250
> __Why we need this__: if an issue contains no minimal reproduction or just
251251
> a link to a repository with thousands of files, the maintainers would need to
@@ -259,7 +259,7 @@ automatically upload it to GitHub.
259259
process. The reason is that the reproduction which is automatically
260260
produced by the [built-in info plugin] contains all of the necessary
261261
environment information that is often forgotten to be included.
262-
262+
263263
Additionally, there are many non-technical users of Material for MkDocs that
264264
have trouble creating repositories.
265265

@@ -301,7 +301,7 @@ only relevant when the bug you are reporting does not involve a crash when
301301

302302
Thanks for following the guide and creating a high-quality and complete bug
303303
report – you are almost done. This section ensures that you have read this guide
304-
and have worked to the best of your knowledge to provide us with everything we
304+
and have worked to the best of your knowledge to provide us with everything we
305305
need to know to help you.
306306

307307
__We'll take it from here.__

docs/conventions.md

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Conventions
2+
3+
This section explains several conventions used in this documentation.
4+
5+
## Symbols
6+
7+
This documentation use some symbols for illustration purposes. Before you read
8+
on, please make sure you've made yourself familiar with the following list of
9+
conventions:
10+
11+
### <!-- md:sponsors --> – Sponsors only { data-toc-label="Sponsors only" }
12+
13+
The pumping heart symbol denotes that a specific feature or behavior is only
14+
available to sponsors via [Insiders]. Make sure that you have access to
15+
[Insiders] if you want to use the feature.
16+
17+
### <!-- md:version --> – Version { data-toc-label="Version" }
18+
19+
The tag symbol in conjunction with a version number denotes when a specific
20+
feature or behavior was added. Make sure you're at least on this version
21+
if you want to use it.
22+
23+
### <!-- md:version insiders- --> – Version (Insiders) { data-toc-label="Version (Insiders)" }
24+
25+
The tag symbol with a heart in conjunction with a version number denotes that a
26+
specific feature or behavior was added to the [Insiders] version of Material for
27+
MkDocs.
28+
29+
### <!-- md:default --> – Default value { #default data-toc-label="Default value" }
30+
31+
Some properties in `mkdocs.yml` have default values for when the author does not
32+
explicitly define them. The default value of the property is always included.
33+
34+
#### <!-- md:default computed --> – Default value is computed { #default data-toc-label="is computed" }
35+
36+
Some default values are not set to static values but computed form other values,
37+
like the site language, repository provider, or other settings.
38+
39+
#### <!-- md:default none --> – Default value is empty { #default data-toc-label="is empty" }
40+
41+
Some properties do not contain default values. This means that the functionality
42+
that is associated with them is not available unless explicitly enabled.
43+
44+
### <!-- md:flag metadata --> – Metadata property { #metadata data-toc-label="Metadata property" }
45+
46+
This symbol denotes that the thing described is a metadata property, which can
47+
be used in Markdown documents as part of the front matter definition.
48+
49+
### <!-- md:feature --> – Optional feature { #feature data-toc-label="Optional feature" }
50+
51+
Most of the features are hidden behind feature flags, which means they must
52+
be explicitly enabled via `mkdocs.yml`. This allows for the existence of
53+
potentially orthogonal features.
54+
55+
### <!-- md:flag experimental --> – Experimental { data-toc-label="Experimental" }
56+
57+
Some newer features are still considered experimental, which means the ymight
58+
(although rarely) change at any time, including their complete removal (which
59+
hasn't happened yet).
60+
61+
### <!-- md:plugin --> – Plugin { data-toc-label="Plugin" }
62+
63+
Several features are implemented through MkDocs excellent plugin architecture,
64+
some of which are built-in and distributed with Material for MkDocs, so no
65+
installation is required.
66+
67+
### <!-- md:extension --> – Markdown extension { data-toc-label="Markdown extension" }
68+
69+
This symbol denotes that the thing described is a Markdown extension, which can
70+
be enabled in `mkdocs.yml` and adds additional functionality to the Markdown
71+
parser.
72+
73+
### <!-- md:flag required --> – Required value { #required data-toc-label="Required value" }
74+
75+
Some (very few in fact) properties or settings are required, which means the
76+
authors must explicitly define them.
77+
78+
### <!-- md:flag customization --> – Customization { #customization data-toc-label="Customization" }
79+
80+
This symbol denotes that the thing described is a customization that must be
81+
added by the author.
82+
83+
### <!-- md:utility --> – Utility { data-toc-label="Utility" }
84+
85+
Besides plugins, there are some utilities that build on top of MkDocs in order
86+
to provide extended functionality, like for example support for versioning.
87+
88+
[Insiders]: insiders/index.md

docs/creating-your-site.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Creating your site
22

3-
After you've [installed] Material for MkDocs, you can bootstrap your project
3+
After you've [installed] Material for MkDocs, you can bootstrap your project
44
documentation using the `mkdocs` executable. Go to the directory where you want
55
your project to be located and enter:
66

@@ -48,7 +48,7 @@ theme:
4848
4949
???+ tip "Recommended: [configuration validation and auto-complete]"
5050
51-
In order to minimize friction and maximize productivity, Material for MkDocs
51+
In order to minimize friction and maximize productivity, Material for MkDocs
5252
provides its own [schema.json][^1] for `mkdocs.yml`. If your editor supports
5353
YAML schema validation, it's definitely recommended to set it up:
5454

docs/customization.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ to make more fundamental changes, it may be necessary to make the adjustments
225225
directly in the source of the theme and recompile it.
226226

227227
[^1]:
228-
Prior to :octicons-tag-24: 7.0.0 the build was based on Webpack, resulting
228+
Prior to <!-- md:version 7.0.0 --> the build was based on Webpack, resulting
229229
in occasional broken builds due to incompatibilities with loaders and
230230
plugins. Therefore, we decided to swap Webpack for a leaner solution which
231231
is now based on [RxJS] as the application itself. This allowed for the

docs/guides/creating-a-reproduction.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Creating a reproduction
22

3-
A reproduction is a simplified version of a bug that demonstrates the specific
4-
scenario in which the bug occurred. It includes all necessary minimal settings
5-
and instructions and should be as simple as possible while still demonstrating
3+
A reproduction is a simplified version of a bug that demonstrates the specific
4+
scenario in which the bug occurred. It includes all necessary minimal settings
5+
and instructions and should be as simple as possible while still demonstrating
66
the issue.
77

88
## Guide
@@ -87,19 +87,19 @@ inside it. Next:
8787
bug, create only the necessary amount of Markdown documents. __Repeat this
8888
step until the bug you want to report can be observed.__
8989
90-
4. As a last step, before packing everything into a .zip file, double-check
90+
4. As a last step, before packing everything into a `.zip` file, double-check
9191
all settings and documents if they are essential to the reproduction, which
9292
means that the bug does not occur when they are omitted. Remove all
9393
non-essential lines and files.
9494
9595
[bug reporting guide]: ../contributing/reporting-a-bug.md#upgrade-to-latest-version
9696
[minimal configuration]: ../creating-your-site.md#minimal-configuration
9797
98-
### Creating a .zip file
98+
### Creating a `.zip` file
9999
100100
Material for MkDocs 9.0.0 includes a new plugin solely intended to create
101101
reproductions for bug reports. When the built-in info plugin is enabled, MkDocs
102-
will add all relevant files to a .zip, print a summary to the terminal and
102+
will add all relevant files to a `.zip`, print a summary to the terminal and
103103
exit. Add the following lines to `mkdocs.yml`:
104104
105105
``` yaml

0 commit comments

Comments
 (0)