11---
22template : overrides/main.html
3- title : Switching to Insiders
3+ title : Getting started with Insiders
44---
55
6- # Switching to Insiders
6+ # Getting started with Insiders
77
8- Material for MkDocs Insiders is a fully compatible drop-in replacement[ ^ 1 ] for
9- Material for MkDocs, and can be installed similarily using [ ` pip ` ] [ pip ] ,
10- [ ` docker ` ] [ docker ] or [ ` git ` ] [ git ] . Note that in order to get access to the
11- Insiders repository, you need to [ become an eligible sponsor] of @squidfunk .
12-
13- [ ^ 1 ] :
14- While Insiders always strives for full downward compatibility with Material
15- for MkDocs, there are some cases which slightly deviate from the non-Insiders,
16-
17- because
18- configuration can't be shared due to limitations of MkDocs. This is
19- particularly true for the ` plugins ` configuration, as Insiders provides
20- several built-in plugins.
8+ Material for MkDocs Insiders is a compatible drop-in replacement for Material
9+ for MkDocs, and can be installed similarily using [ ` pip ` ] [ pip ] ,
10+ [ ` docker ` ] [ docker ] or [ ` git ` ] [ git ] . Note that in order to access the Insiders
11+ repository, you need to [ become an eligible sponsor] of @squidfunk on GitHub.
2112
2213 [ pip ] : #with-pip
2314 [ docker ] : #with-docker
@@ -27,9 +18,9 @@ Insiders repository, you need to [become an eligible sponsor] of @squidfunk.
2718## Requirements
2819
2920After you've been added to the list of collaborators and accepted the
30- invitation, the Insiders repository programmatically (from the command
31- line or GitHub Actions workflows), you need to create a [ personal access
32- token ] :
21+ repository invitation, the next step is to create a [ personal access token ] for
22+ your GitHub account in order to access the Insiders repository programmatically
23+ (from the command line or GitHub Actions workflows) :
3324
34251 . Go to https://github.com/settings/tokens
35262 . Click on [ Generate a new token]
@@ -138,3 +129,39 @@ pip install -e mkdocs-material
138129 [ publish ] : https://github.com/squidfunk/mkdocs-material-insiders/blob/master/.github/workflows/publish.yml
139130
140131## Caveats
132+
133+ This sections describes some aspects to consider when using Insiders together
134+ with Material for MkDocs to ensure that users without access to Insiders can
135+ still build your documentation.
136+
137+ ### Built-in plugins
138+
139+ When using built-in plugins that are solely available via Insiders, it might be
140+ necessary to split the ` mkdocs.yml ` configuration into a base configuration, and
141+ one with plugin overrides. Note that this is a limitation of MkDocs, which can
142+ be mitigated by using [ configuration inheritance] :
143+
144+ === ":octicons-file-code-16: mkdocs.insiders.yml"
145+
146+ ``` yaml
147+ INHERIT: mkdocs.yml
148+ plugins:
149+ - search
150+ - social
151+ - tags
152+ ```
153+
154+ === ":octicons-file-code-16: mkdocs.yml"
155+
156+ ``` yaml
157+ # Configuration with everything except Insiders plugins
158+ ```
159+
160+ Now, when you're in an environment with access to Insiders (e.g. in your CI
161+ pipeline), you can build your documentation project with the following lines:
162+
163+ ```
164+ mkdocs build --config-file mkdocs.insiders.yml
165+ ```
166+
167+ [ configuration inheritance ] : https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance
0 commit comments