@@ -20,15 +20,48 @@ If not, we recommended using [`docker`][docker].
2020
2121Material for MkDocs can be installed with ` pip ` :
2222
23- ```
24- pip install mkdocs-material
25- ```
23+ === "Latest"
24+
25+ ``` sh
26+ pip install mkdocs-material
27+ ```
28+
29+ === "8.x <small >version range</small >"
30+
31+ ``` sh
32+ pip install mkdocs-material=="8.*" #(1)!
33+ ```
34+
35+ 1. Material for MkDocs uses [semantic versioning][^1], which is why it's a
36+ good idea to limit upgrades to the current major version.
37+
38+ This will make sure that you don't accidentally [upgrade to the next
39+ major version], which may include breaking changes that silently break
40+ your site. Additionally, you can use `pip freeze` to create a lockfile,
41+ so builds are reproducible at all times:
42+
43+ ```
44+ pip freeze > requirements.txt
45+ ```
46+
47+ Now, the lockfile can be used for installation:
48+
49+ ```
50+ pip install -r requirements.txt
51+ ```
52+
53+ [ ^ 1 ] :
54+ Note that improvements of existing features are sometimes released as
55+ patch releases, like for example improved rendering of content tabs, as
56+ they're not considered to be new features.
2657
2758This will automatically install compatible versions of all dependencies:
2859[ MkDocs] , [ Markdown] , [ Pygments] and [ Python Markdown Extensions] . Material for
2960MkDocs always strives to support the latest versions, so there's no need to
3061install those packages separately.
3162
63+ [ semantic versioning ] : https://semver.org/
64+ [ upgrade to the next major version ] : upgrade.md
3265 [ Markdown ] : https://python-markdown.github.io/
3366 [ Pygments ] : https://pygments.org/
3467 [ Python Markdown Extensions ] : https://facelessuser.github.io/pymdown-extensions/
@@ -39,9 +72,17 @@ The official [Docker image] is a great way to get up and running in a few
3972minutes, as it comes with all dependencies pre-installed. Pull the image for the
4073` latest ` version with:
4174
42- ```
43- docker pull squidfunk/mkdocs-material
44- ```
75+ === "Latest"
76+
77+ ```
78+ docker pull squidfunk/mkdocs-material
79+ ```
80+
81+ === "8.x <small >version range</small >"
82+
83+ ```
84+ docker pull squidfunk/mkdocs-material:8
85+ ```
4586
4687The ` mkdocs ` executable is provided as an entry point and ` serve ` is the
4788default command. If you're not familiar with Docker don't worry, we have you
0 commit comments