Publishing Docs

We use mkdocs and mike for publishing docs to docs.k0sproject.io. This guide will provide a simple how-to on how to configure and deploy newly added docs to our website.

Requirements

Install mike: https://github.com/jimporter/mike#installation

  • All docs must live under the docs directory (I.E., changes to the main README.md are not reflected in the website).
  • Add a new link under nav in the main mkdocs.yml file:
  1. nav:
  2. - Overview: README.md
  3. - Creating A Cluster:
  4. - Quick Start Guide: create-cluster.md
  5. - Run in Docker: k0s-in-docker.md
  6. - Single node set-up: k0s-single-node.md
  7. - Configuration Reference:
  8. - Architecture: architecture.md
  9. - Networking: networking.md
  10. - Configuration Options: configuration.md
  11. - Using Cloud Providers: cloud-providers.md
  12. - Running k0s with Traefik: examples/traefik-ingress.md
  13. - Running k0s as a service: install.md
  14. - k0s CLI Help Pages: cli/k0s.md
  15. - Deploying Manifests: manifests.md
  16. - FAQ: FAQ.md
  17. - Troubleshooting: troubleshooting.md
  18. - Contributing:
  19. - Overview: contributors/overview.md
  20. - Workflow: contributors/github_workflow.md
  21. - Testing: contributors/testing.md

Testing docs locally

We’ve got a dockerized setup for easily testing docs locally. Simply run make docs-serve-dev. The docs will be available on http://localhost:8000.

Note If you have something already running locally on port 8000 you can choose another port like so: make docs-serve-dev DOCS_DEV_PORT=9999. The docs will then be available on http://localhost:9999.