Skip to content

Commit

Permalink
Include the mkdocs nav section directly
Browse files Browse the repository at this point in the history
Use the include-markdown plugin to fetch the nav section directly into
the docs page about how to add docs pages :-)

Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed Oct 11, 2024
1 parent 092a73f commit 28ccd09
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
26 changes: 5 additions & 21 deletions docs/contributors/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,11 @@ Install mike: https://github.com/jimporter/mike#installation
- Add a new link under `nav` in the main [mkdocs.yml](https://github.com/k0sproject/k0s/blob/main/mkdocs.yml) file:

```yaml
nav:
- Overview: README.md
- Creating A Cluster:
- Quick Start Guide: create-cluster.md
- Run in Docker: k0s-in-docker.md
- Single node set-up: k0s-single-node.md
- Configuration Reference:
- Architecture: architecture.md
- Networking: networking.md
- Configuration Options: configuration.md
- Using Cloud Providers: cloud-providers.md
- Running k0s with Traefik: examples/traefik-ingress.md
- Running k0s as a service: install.md
- k0s CLI Help Pages: cli/k0s.md
- Deploying Manifests: manifests.md
- FAQ: FAQ.md
- Troubleshooting: troubleshooting.md
- Contributing:
- Overview: contributors/overview.md
- Workflow: contributors/github_workflow.md
- Testing: contributors/testing.md
{%
include "../../mkdocs.yml"
start="# ~~~ START NAV ~~~\n"
end="# ~~~ END NAV ~~~\n"
%}
```

- Once your changes are pushed to `main`, the "Publish Docs" jos will start running: https://github.com/k0sproject/k0s/actions?query=workflow%3A%22Publish+docs+via+GitHub+Pages%22
Expand Down
11 changes: 11 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
babel==2.16.0
bracex==2.5.post1
certifi==2024.8.30
charset-normalizer==2.1.1
click==8.1.7
colorama==0.4.6
ghp-import==2.1.0
idna==3.10
importlib-metadata==8.5.0
importlib-resources==6.4.5
Jinja2==3.1.4
Markdown==3.7
MarkupSafe==3.0.1
Expand All @@ -12,10 +16,15 @@ mergedeep==1.3.4
mike==2.1.3
mkdocs==1.6.1
mkdocs-exclude==1.0.2
mkdocs-get-deps==0.2.0
mkdocs-include-markdown-plugin==6.2.2
mkdocs-macros-plugin==1.2.0
mkdocs-material==9.5.39
mkdocs-material-extensions==1.3.1
packaging==24.1
paginate==0.5.7
pathspec==0.12.1
platformdirs==4.3.6
Pygments==2.18.0
pymdown-extensions==10.11.2
pyparsing==3.1.4
Expand All @@ -29,3 +38,5 @@ termcolor==2.5.0
urllib3==1.26.20
verspec==0.1.0
watchdog==5.0.3
wcmatch==10.0
zipp==3.20.2
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ copyright:
Copyright &copy; 2021 <a href="https://mirantis.com/">Mirantis Inc.</a>
- All rights reserved.
edit_uri: ""

# ~~~ START NAV ~~~
nav:
- Overview: README.md
- Installation:
Expand Down Expand Up @@ -81,6 +83,7 @@ nav:
- GitHub Workflow: contributors/github_workflow.md
- Testing: contributors/testing.md
- Documentation: contributors/docs.md
# ~~~ END NAV ~~~

theme:
name: "material"
Expand Down Expand Up @@ -122,6 +125,7 @@ plugins:
- Makefile*
- requirements_pip.txt
- requirements.txt
- include-markdown

markdown_extensions:
- pymdownx.highlight: {}
Expand Down

0 comments on commit 28ccd09

Please sign in to comment.