@@ -20,15 +20,48 @@ If not, we recommended using [`docker`][docker].
20
20
21
21
Material for MkDocs can be installed with ` pip ` :
22
22
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.
26
57
27
58
This will automatically install compatible versions of all dependencies:
28
59
[ MkDocs] , [ Markdown] , [ Pygments] and [ Python Markdown Extensions] . Material for
29
60
MkDocs always strives to support the latest versions, so there's no need to
30
61
install those packages separately.
31
62
63
+ [ semantic versioning ] : https://semver.org/
64
+ [ upgrade to the next major version ] : upgrade.md
32
65
[ Markdown ] : https://python-markdown.github.io/
33
66
[ Pygments ] : https://pygments.org/
34
67
[ 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
39
72
minutes, as it comes with all dependencies pre-installed. Pull the image for the
40
73
` latest ` version with:
41
74
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
+ ```
45
86
46
87
The ` mkdocs ` executable is provided as an entry point and ` serve ` is the
47
88
default command. If you're not familiar with Docker don't worry, we have you
0 commit comments