1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-12 01:50:52 +01:00

Added clearer notes on docker image

This commit is contained in:
squidfunk 2017-11-05 14:40:30 +01:00 committed by Martin Donath
parent 64a09ec0f2
commit 2bdb031c35

View File

@ -2,17 +2,9 @@
## Installation ## Installation
!!! tip "Set up Material using Docker"
The official [Docker image][1] for Material comes with all dependencies
pre-installed and ready-to-use with the latest version published on PyPI,
packaged in a very small image (36MB compressed).
[1]: https://hub.docker.com/r/squidfunk/mkdocs-material/
### Installing MkDocs ### Installing MkDocs
Before installing [MkDocs][2], you need to make sure you have Python and `pip` Before installing [MkDocs][1], you need to make sure you have Python and `pip`
the Python package manager up and running. You can verify if you're already the Python package manager up and running. You can verify if you're already
good to go with the following commands: good to go with the following commands:
@ -30,11 +22,9 @@ pip install mkdocs && mkdocs --version
# mkdocs, version 0.17.1 # mkdocs, version 0.17.1
``` ```
!!! warning "MkDocs version requirements" Material requires MkDocs >= 0.17.1.
Material requires MkDocs >= 0.17.1 [1]: http://www.mkdocs.org
[2]: http://www.mkdocs.org
### Installing Material ### Installing Material
@ -48,18 +38,18 @@ pip install mkdocs-material
#### using choco #### using choco
If you're on Windows you can use [Chocolatey][3] to install [Material][4]: If you're on Windows you can use [Chocolatey][2] to install [Material][3]:
``` dos ``` dos
choco install mkdocs-material choco install mkdocs-material
``` ```
This will install all required dependencies like [Python][5] and [MkDocs][6]. This will install all required dependencies like [Python][4] and [MkDocs][5].
[3]: https://chocolatey.org [2]: https://chocolatey.org
[4]: https://chocolatey.org/packages/mkdocs-material [3]: https://chocolatey.org/packages/mkdocs-material
[5]: https://chocolatey.org/packages/python [4]: https://chocolatey.org/packages/python
[6]: https://chocolatey.org/packages/mkdocs [5]: https://chocolatey.org/packages/mkdocs
#### cloning from GitHub #### cloning from GitHub
@ -70,12 +60,12 @@ repository into a subfolder of your project's root directory:
git clone https://github.com/squidfunk/mkdocs-material.git git clone https://github.com/squidfunk/mkdocs-material.git
``` ```
This is especially useful if you want to [extend the theme][7] and This is especially useful if you want to [extend the theme][6] and
[override some parts][8] of the theme. The theme will reside in the folder [override some parts][7] of the theme. The theme will reside in the folder
`mkdocs-material/material`. `mkdocs-material/material`.
[7]: customization.md#extending-the-theme [6]: customization.md#extending-the-theme
[8]: customization.md#overriding-partials [7]: customization.md#overriding-partials
### Troubleshooting ### Troubleshooting
@ -100,6 +90,25 @@ This is especially useful if you want to [extend the theme][7] and
Material theme through `pip`, so both packages end up in different Material theme through `pip`, so both packages end up in different
locations. MkDocs only checks its install location for themes. locations. MkDocs only checks its install location for themes.
### Alternative: Using Docker
If you're familiar with Docker, the official [Docker image][8] for Material
comes with all dependencies pre-installed and ready-to-use with the latest
version published on PyPI, packaged in a very small image. Pull it with:
```
docker pull squidfunk/mkdocs-material
```
The `mkdocs` executable is provided as an entrypoint, `serve` is the default
command. Start the development server in your project root with:
```
docker run --rm -it -p 8000:8000 -v `pwd`:/docs squidfunk/mkdocs-material
```
[8]: https://hub.docker.com/r/squidfunk/mkdocs-material/
## Usage ## Usage
In order to enable the theme just add one of the following lines to your In order to enable the theme just add one of the following lines to your