|
1 | | -MKDOCS_VER = 9.6.1 |
2 | | -# insiders version/tag https://github.com/srl-labs/mkdocs-material-insiders/pkgs/container/mkdocs-material-insiders |
3 | | -# when changing the version, update the version in the cicd.yml file |
4 | | -MKDOCS_INS_VER = 9.6.16-insiders-4.53.16-hellt |
| 1 | +MKDOCS_VERSION ?= v9.7.1-1 |
| 2 | +MKDOCS_INET_IMAGE := ghcr.io/eda-labs/mkdocs-material:$(MKDOCS_VERSION) |
5 | 3 |
|
6 | 4 | .PHONY: docs |
7 | 5 | docs: |
8 | | - docker run --rm -v $$(pwd):/docs --entrypoint mkdocs registry.srlinux.dev/pub/mkdocs-material-insiders:$(MKDOCS_INS_VER) build --clean --strict |
| 6 | + docker run --rm -v $$(pwd):/docs --entrypoint mkdocs ${MKDOCS_INET_IMAGE} build --clean --strict |
9 | 7 |
|
10 | | -# serve the site locally using mkdocs-material public container |
11 | | -.PHONY: serve |
12 | | -serve: |
13 | | - docker run -it --rm -p 8001:8000 -v $$(pwd):/docs squidfunk/mkdocs-material:$(MKDOCS_VER) |
14 | | - |
15 | | -# serve the site locally using mkdocs-material insiders container |
16 | | -.PHONY: serve-insiders |
17 | | -serve-insiders: |
| 8 | +# serve the doc site locally with full site rendered on each change (slower) |
| 9 | +.PHONY: serve-docs-full |
| 10 | +serve-docs-full: |
18 | 11 | docker run -it --rm -p 8001:8000 -v $$(pwd):/docs registry.srlinux.dev/pub/mkdocs-material-insiders:$(MKDOCS_INS_VER) |
19 | 12 |
|
20 | | -# serve the site locally using mkdocs-material insiders container using dirty-reloader |
21 | | -.PHONY: serve-insiders-dirty |
22 | | -serve-insiders-dirty: |
23 | | - docker run -it --rm -p 8001:8000 -v $$(pwd):/docs registry.srlinux.dev/pub/mkdocs-material-insiders:$(MKDOCS_INS_VER) serve --dirtyreload -a 0.0.0.0:8000 |
24 | | - |
| 13 | +# serve the doc site locally with dirty reload (faster, but toc updates may require a manual stop/start) |
25 | 14 | .PHONY: serve-docs |
26 | | -serve-docs: serve-insiders-dirty |
| 15 | +serve-docs: |
| 16 | + docker run -it --rm -p 8001:8000 -v $$(pwd):/docs ${MKDOCS_INET_IMAGE} serve --dirtyreload -a 0.0.0.0:8000 |
27 | 17 |
|
28 | 18 | .PHONY: htmltest |
29 | 19 | htmltest: |
30 | | - docker run --rm -v $$(pwd):/docs --entrypoint mkdocs registry.srlinux.dev/pub/mkdocs-material-insiders:$(MKDOCS_INS_VER) build --clean --strict |
| 20 | + docker run --rm -v $$(pwd):/docs --entrypoint mkdocs ${MKDOCS_INET_IMAGE} build --clean --strict |
31 | 21 | docker run --rm -v $$(pwd):/test wjdp/htmltest --conf ./site/htmltest.yml |
32 | 22 | rm -rf ./site |
33 | 23 |
|
34 | 24 | build-insiders: |
35 | | - docker run -v $$(pwd):/docs --entrypoint mkdocs registry.srlinux.dev/pub/mkdocs-material-insiders:$(MKDOCS_INS_VER) build --clean --strict |
| 25 | + docker run -v $$(pwd):/docs --entrypoint mkdocs ${MKDOCS_INET_IMAGE} build --clean --strict |
36 | 26 |
|
37 | 27 | push-docs: # push docs to gh-pages branch manually. Use when pipeline misbehaves |
38 | | - docker run -v ${SSH_AUTH_SOCK}:/ssh-agent --env SSH_AUTH_SOCK=/ssh-agent --env GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" -v $$(pwd):/docs --entrypoint mkdocs ghcr.io/srl-labs/mkdocs-material-insiders:$(MKDOCS_INS_VER) gh-deploy --force --strict |
| 28 | + docker run -v ${SSH_AUTH_SOCK}:/ssh-agent --env SSH_AUTH_SOCK=/ssh-agent --env GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" -v $$(pwd):/docs --entrypoint mkdocs ${MKDOCS_INET_IMAGE} gh-deploy --force --strict |
39 | 29 |
|
40 | | -add-no-index: # replace noindex commen in main template to include robots noindex instruction. This is needed prior pushing to staging, so that staging is not indexed by robots |
| 30 | +add-no-index: # replace noindex comment in main template to include robots noindex instruction. This is needed prior pushing to staging, so that staging is not indexed by robots |
41 | 31 | sed -i 's/<!-- NOINDEX -->/<meta name="robots" content="noindex">/g' docs/overrides/main.html |
42 | 32 |
|
43 | 33 | # build html docs and push to staging1 server - https://hellt.github.io/learn-srlinux-stage1 |
|
0 commit comments