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 28, 2024
1 parent e9ebae6 commit 9d8ecc3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
28 changes: 7 additions & 21 deletions docs/contributors/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,13 @@ 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/index.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
# ... other directives
{%
include "../../mkdocs.yml"
start="# ~~~ START NAV SNIPPET ~~~\n"
end="\n# ~~~ END NAV SNIPPET ~~~\n"
%}
# more navigation links ...
```

- 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
3 changes: 3 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 SNIPPET ~~~
nav:
- Overview: README.md
- Installation:
Expand All @@ -25,6 +27,7 @@ nav:
- System Requirements: system-requirements.md
- External runtime dependencies: external-runtime-deps.md
- Verifying Signed Binaries: verifying-signs.md
# ~~~ END NAV SNIPPET ~~~
- Maintenance:
- Upgrade: upgrade.md
- Backup/Restore: backup.md
Expand Down

0 comments on commit 9d8ecc3

Please sign in to comment.