Skip to content

Commit 1868189

Browse files
committed
Updated documentation
1 parent e65b712 commit 1868189

File tree

4 files changed

+116
-4
lines changed

4 files changed

+116
-4
lines changed

docs/insiders/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ a handful of them, [thanks to our awesome sponsors]!
8888
## What's in it for me?
8989

9090
The moment you [become a sponsor][how to become a sponsor], you'll get __immediate
91-
access to 22 additional features__ that you can __start using now__, and
91+
access to 23 additional features__ that you can __start using now__, and
9292
which are currently exclusively available to sponsors:
9393

9494
<div class="mdx-columns" markdown>
9595

96+
- [x] [Projects plugin] :material-alert-decagram:{ .mdx-pulse title="Added on July 29, 2023" }
9697
- [x] [Instant prefetching] :material-alert-decagram:{ .mdx-pulse title="Added on June 15, 2023" }
9798
- [x] [Social plugin: custom layouts] :material-alert-decagram:{ .mdx-pulse title="Added on May 8, 2023" }
9899
- [x] [Social plugin: background images] :material-alert-decagram:{ .mdx-pulse title="Added on May 8, 2023" }
@@ -311,12 +312,14 @@ are released for general availability.
311312

312313
#### $ 24,000 – Blockpaprika
313314

315+
- [x] [Projects plugin]
314316
- [x] [Social plugin: custom layouts]
315317
- [x] [Social plugin: background images]
316318
- [x] [Code range selection]
317319
- [x] [Code annotations: custom selectors]
318320
- [ ] Code line wrap button
319321

322+
[Projects plugin]: ../setup/building-an-optimized-site.md#built-in-projects-plugin
320323
[Social plugin: custom layouts]: ../setup/setting-up-social-cards.md#customization
321324
[Social plugin: background images]: ../setup/setting-up-social-cards.md#+social.cards_layout_params.background_image
322325
[Code range selection]: ../reference/code-blocks.md#code-selection-button

docs/reference/code-blocks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ theme:
162162
[Code annotations support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.0.0
163163
[Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists
164164

165-
#### Custom selectors :material-alert-decagram:{ .mdx-pulse title="Added on February 19, 2023" }
165+
#### Custom selectors
166166

167167
[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } ·
168168
[:octicons-tag-24: insiders-4.32.0][Insiders] ·

docs/setup/building-an-optimized-site.md

Lines changed: 110 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,116 @@ further useful automatic optimization techniques.
99

1010
## Configuration
1111

12-
### Built-in optimize plugin :material-alert-decagram:{ .mdx-pulse title="Added on January 21, 2023" }
12+
### Built-in projects plugin :material-alert-decagram:{ .mdx-pulse title="Added on July 29, 2023" }
13+
14+
[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } ·
15+
[:octicons-tag-24: insiders-4.38.0][Insiders] ·
16+
:octicons-cpu-24: Plugin ·
17+
:octicons-beaker-24: Experimental
18+
19+
The built-in projects plugin allows to split your documentation into multiple
20+
distinct MkDocs projects, __build them concurrently__ and
21+
__serve them together__. Add the following to `mkdocs.yml`:
22+
23+
``` yaml
24+
plugins:
25+
- projects
26+
```
27+
28+
Next, create a folder called `projects` in your root directory which will
29+
contain all projects. For example, if we want to build a project with two
30+
additional languages, we can use:
31+
32+
``` { .sh .no-copy }
33+
.
34+
├─ projects/
35+
│ ├─ de/
36+
│ │ ├─ docs/
37+
│ │ └─ mkdocs.yml
38+
│ └─ fr/
39+
│ ├─ docs/
40+
│ └─ mkdocs.yml
41+
└─ mkdocs.yml
42+
```
43+
44+
If you now invoke `mkdocs serve` and change a file in one of the projects,
45+
the projects plugin makes sure that MkDocs will also reload those files. Note
46+
that the projects are currently entirely separate, which means they will have
47+
separate search indexes and sitemaps. We're happy to receive feedback on this
48+
plugin and learn about your requirements to make it better, as we plan to add
49+
support for merging and hoisting files.
50+
[Create a discussion to share your thoughts!][discussion]
51+
52+
[discussion]: https://github.com/squidfunk/mkdocs-material/discussions
53+
54+
??? info "Use cases for the projects plugin"
55+
56+
Ideal use cases for the projects plugin are:
57+
58+
- Building a multi-language site
59+
- Building a blog alongside your documentation
60+
- Splitting large code bases for better performance
61+
62+
Note that the plugin is currently experimental. We're releasing it early,
63+
so that we can improve it together with our users and make it even more
64+
powerful as we discover new use cases.
65+
66+
The following configuration options are available:
67+
68+
[`enabled`](#+projects.enabled){ #+projects.enabled }
69+
70+
: :octicons-milestone-24: Default: `true` – This option specifies whether
71+
the plugin is enabled when building your project. If you want to speed up
72+
local builds, you can use an [environment variable]:
73+
74+
``` yaml
75+
plugins:
76+
- projects:
77+
enabled: !ENV [CI, false]
78+
```
79+
80+
[`concurrency`](#+projects.concurrency){ #+projects.concurrency }
81+
82+
: :octicons-milestone-24: Default: _number of CPUs_ – This option specifies
83+
how many CPUs the plugin is allowed to use when building projects.
84+
With more CPUs, the plugin can do more work in the same time, thus complete
85+
optimization faster. Concurrent processing can be disabled with:
86+
87+
``` yaml
88+
plugins:
89+
- projects:
90+
concurrency: 1
91+
```
92+
93+
#### Projects
94+
95+
The following configuration options are available for projects:
96+
97+
[`projects`](#+projects.projects){ #+projects.projects }
98+
99+
: :octicons-milestone-24: Default: `true` – This option specifies whether
100+
to build nested projects. If you want to switch the plugin off, e.g.
101+
for local builds, you can use an [environment variable]:
102+
103+
``` yaml
104+
plugins:
105+
- projects:
106+
projects: !ENV [CI, false]
107+
```
108+
109+
[`projects_dir`](#+projects.projects_dir){ #+projects.projects_dir }
110+
111+
: :octicons-milestone-24: Default: `projects` – This option specifies the
112+
name of the folder the plugin expects your projects to be stored. While it's
113+
usually not necessary to change this option, change it with:
114+
115+
``` yaml
116+
plugins:
117+
- projects:
118+
projects_dir: path/to/folder
119+
```
120+
121+
### Built-in optimize plugin
13122

14123
[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } ·
15124
[:octicons-tag-24: insiders-4.29.0][Insiders] ·

docs/setup/ensuring-data-privacy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ The following configuration options are available:
179179
enabled: !ENV [CI, false]
180180
```
181181

182-
[`concurrency`](#+privacy.concurrency){ #+privacy.concurrency } :material-alert-decagram:{ .mdx-pulse title="Added on February 6, 2023" }
182+
[`concurrency`](#+privacy.concurrency){ #+privacy.concurrency }
183183

184184
: :octicons-milestone-24: Default: _number of CPUs_ – This option specifies
185185
how many CPUs the plugin is allowed to use when downloading external assets.

0 commit comments

Comments
 (0)