@@ -239,12 +239,37 @@ directly in the source of the theme and recompile it.
239239
240240# ## Environment setup
241241
242- First, clone the repository :
242+ First, clone the repository for the edition you want to work on. If
243+ you want to clone the Insiders repository, you need to become a
244+ sponsor first to gain access.
243245
244- ` ` `
245- git clone https://github.com/squidfunk/mkdocs-material
246- cd mkdocs-material
247- ` ` `
246+ [Insiders] : insiders/index.md
247+
248+ === "Material for MkDocs"
249+
250+ ```
251+ git clone https://github.com/squidfunk/mkdocs-material
252+ cd mkdocs-material
253+ ```
254+
255+ === "Insiders"
256+
257+ You will need to have a GitHub access token [as described in the
258+ Insiders documentation] and make it available in the `$GH_TOKEN`
259+ variable.
260+
261+ ` ` ` sh
262+ git clone https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git # (1)!
263+ ` ` `
264+
265+ 1. If you are using SSH keys for authenticating with GitHub, you can
266+ clone Insiders with this command :
267+
268+ ```
269+ git clone [email protected] :squidfunk/mkdocs-material-insiders.git 270+ ```
271+
272+ [as described in the Insiders documentation] : insiders/getting-started.md#requirements
248273
249274Next, create a new [Python virtual environment][venv] and
250275[activate][venv-activate] it :
@@ -254,17 +279,46 @@ python -m venv venv
254279source venv/bin/activate
255280` ` `
256281
282+ !!! note "Ensure pip always runs in a virtual environment"
283+
284+ If you set the environment variable `PIP_REQUIRE_VIRTUALENV` to
285+ ` true` , `pip` will refuse to install anything outside a virtual
286+ environment. Forgetting to activate a `venv` can be very annoying
287+ as it will install all sorts of things outside virtual
288+ environments over time, possibly leading to further errors. So,
289+ you may want to add this to your `.bashrc` or `.zshrc` and
290+ re-start your shell :
291+
292+ ```
293+ export PIP_REQUIRE_VIRTUALENV=true
294+ ```
295+
257296 [venv] : https://docs.python.org/3/library/venv.html
258297 [venv-activate] : https://docs.python.org/3/library/venv.html#how-venvs-work
259298
260299Then, install all Python dependencies :
261300
262- ` ` `
263- pip install -e .
264- pip install mkdocs-minify-plugin
265- pip install mkdocs-redirects
266- pip install nodeenv
267- ` ` `
301+ === "Material for MkDocs"
302+
303+ ```
304+ pip install -e .
305+ pip install "mkdocs-material[recommended]"
306+ pip install nodeenv
307+ ```
308+
309+ === "Insiders"
310+
311+ ```
312+ pip install -e .
313+ pip install "mkdocs-material[recommended, imaging]"
314+ pip install nodeenv
315+ ```
316+
317+ In addition, you will need to install the `cairo` and `pngquant` libraries in your
318+ system, as described in the [image processing] requirements guide.
319+
320+ [image processing] : plugins/requirements/image-processing.md
321+
268322
269323Finally, install the [Node.js] LTS version into the Python virtual environment
270324and install all Node.js dependencies :
0 commit comments