Skip to content

Commit 1f41457

Browse files
committed
Initial commit
0 parents  commit 1f41457

File tree

4 files changed

+98
-0
lines changed

4 files changed

+98
-0
lines changed

.gitignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) 2020 Martin Donath <[email protected]>
2+
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to
5+
# deal in the Software without restriction, including without limitation the
6+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7+
# sell copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
10+
# The above copyright notice and this permission notice shall be included in
11+
# all copies or substantial portions of the Software.
12+
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19+
# IN THE SOFTWARE.
20+
21+
# macOS internals
22+
.DS_Store
23+
24+
# Python-related
25+
__pycache__
26+
venv
27+
28+
# Files generated by build
29+
/site

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
> This is an example of the new [versioning][1] feature of
2+
[Material for MkDocs][2].
3+
4+
[1]: https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/
5+
[2]: https://squidfunk.github.io/mkdocs-material/
6+
7+
## How to set up versioning
8+
9+
First, install [Material for MkDocs Insiders][3] and [mike][4]:
10+
11+
```
12+
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
13+
pip install mike
14+
```
15+
16+
[3]: https://squidfunk.github.io/mkdocs-material/insiders/
17+
[4]: https://github.com/jimporter/mike
18+
19+
Next, set up your documentation project:
20+
21+
```
22+
mkdocs new .
23+
```
24+
25+
Update `mkdocs.yml`:
26+
27+
``` yaml
28+
site_name: My Docs
29+
theme:
30+
name: material
31+
extra:
32+
version:
33+
method: mike
34+
```
35+
36+
Set the default version to `latest`
37+
38+
```
39+
mike set-default latest
40+
```
41+
42+
Make a change to `docs/index.md`, and publish the first version:
43+
44+
```
45+
mike --push --update-aliases 0.1 latest
46+
```

docs/index.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Welcome to MkDocs 0.1
2+
3+
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
4+
5+
## Commands
6+
7+
* `mkdocs new [dir-name]` - Create a new project.
8+
* `mkdocs serve` - Start the live-reloading docs server.
9+
* `mkdocs build` - Build the documentation site.
10+
* `mkdocs -h` - Print help message and exit.
11+
12+
## Project layout
13+
14+
mkdocs.yml # The configuration file.
15+
docs/
16+
index.md # The documentation homepage.
17+
... # Other markdown pages, images and other files.

mkdocs.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
site_name: My Docs
2+
theme:
3+
name: material
4+
extra:
5+
version:
6+
method: mike

0 commit comments

Comments
 (0)