Headlamp is a Kubernetes debugging tool that provides a visual interface for debugging applications in a Kubernetes cluster. This repository contains the source code for Headlamp's website.
Headlamp's website is built using Docusaurus.
$ npm install
$ npm start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
$ npm build
This command generates static content into the build directory and can be served using any static contents hosting service.
This website shows Headlamp's documentation. The documentation is written in Markdown and is located in the docs directory of the headlamp repository.
When this website is build, it runs the script link-docs.sh which creates symlinks to the documentation in the docs directory of the Headlamp repository.
This script allows to set the documentation location in different ways.
The following command will link the documentation from the docs directory of the Headlamp repository:
$ ./link-docs.sh <path-to-docs-folder-in-a-headlamp-repo-clone>This command will do the same but receive the documentation location as an environment variable:
$ HEADLAMP_DOCS=<path-to-docs-folder-in-a-headlamp-repo-clone> ./link-docs.shWhen run without arguments, the script will attempt to clone the Headlamp repository and link the documentation from the docs directory of that clone.
$ ./link-docs.shTo add plugins to the featured plugins list on the plugins page:
- Be sure to use the link from the github page view of the plugin YAML file ex. https://github.com/headlamp-k8s/plugins/blob/main/example-change-logo/artifacthub-pkg.yml
npm run add-plugin <link-to-plugin-yaml>
This will download the plugin YAML file, parse it, and add it to the list of plugin data files in src/components/PluginsPage/PluginData.
- Run the same command as above (if not already added)
- Locate the
featuredPluginsInfoobject insrc/components/PluginsPage/pluginInfo.ts - Add a new entry to the
featuredPluginsInfoarray for the new plugin, using the same format as the existing entries - Be sure to include
displayName,featDescription,imageSrc, andimageAltfields - Please note that the
displayNamemust match thedisplayNamefield in the plugin YAML file insrc/components/PluginsPage/PluginDatafor the plugin to be recognized as featured
You can use Vale linter to check for common mistakes, spelling errors and validate with Microsoft Writing Style Guide.
To get started you need to install vale.
Then run this command to check a single document
vale docs/latest/path/to/your/page.md
or this command to check all documents
vale docs
Example output of the linter:
docs/latest/installation/in-cluster/index.md
9:4 suggestion 'Using Helm' should use Microsoft.Headings
sentence-style capitalization.
12:57 warning Try to avoid using Microsoft.We
first-person plural like
'our'.
22:11 error Use 'it's' instead of 'it is'. Microsoft.Contractions
...
Latest docs build: a535f13
The line below is updated automatically by a Github Action to point to the latest version of the documentation and trigger a new build of the website.
Headlamp is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.