This repository contains Docusaurus 2 configuration files for generating the documentation of thin-edge.
The documentation source files are stored in the main thin-edge.io repository.
Check out the online documentation to see how the docs looked when published by Docusaurus.
The instructions below detail how to build and serve the documentation.
-
Clone the project and change directory to the project
git clone https://github.com/thin-edge/tedge-docs cd tedge-docs
-
Checkout the thin-edge.io source markdown files
just init # Optional (if you want to include the last official docs as well) just checkout-version
You can also checkout a fork instead (rather than the main project)by providing the git url of the fork as the first positional argument.
just project=https://github.com/myuser/thin-edge.io.git init
-
Start the documentation (using a local dev server)
just docs
Alternatively you can start the doc
just docs-container
Note
- The thin-edge.io repo be cloned automatically in a sibling folder (on the same level as the
tedge-docs
project)
- The thin-edge.io repo be cloned automatically in a sibling folder (on the same level as the
-
You can now edit the thin-edge.io documents under the
docs/src
folder of thethin-edge.io
repository. Any changes will be detected and the browser page will be refreshed automatically.
To support use-cases where the documentation has been fixed after a tag has been created, the following command allows you to checkout a specific branch and treat it like the given version.
The following will checkout the main
branch and treat it as the 0.11.0
version.
just checkout-version 0.11.0 main
Once you have done this, then you can commit the files to the project.
Assuming you have done the initial project setup in the running docs in development section, then you can build the production files using the following steps:
These instructions will produce a static web-site in the build/
folder at the root project directory.
just build
Then verify the result by serving the files:
just docs-container yarn build
Then verify the result by serving the files:
just docs-container yarn serve
The docs also maintain a custom (React) component to display the list of Community Plugins in an interactive way, to make it easier for users to search for plugins which interest them. Each plugin includes a short description, and links to the repository code and the installable package (if applicable).The same plugin list will be visible in all displayed documentation version to increase their visibility to users.
The list of plugins is sourced via a single typescript file which makes it easier to maintain and keep consistent across all plugins.
To add or edit a plugin use the following procedure:
-
Fork the repo
-
Create a new branch with a name relevant to your change
-
Edit the typescript file file and add the plugin to the array
Notes
- Add any relevant tags to the plugins to allow searching for the plugins based on a fixed list of keywords.
-
Create a PR against the
main
branch of the upstream repository