Shared documentation theme, components, and tooling for NetFoundry's Docusaurus-based documentation sites.
docusaurus-shared/
├── packages/
│ └── docusaurus-theme/ # @netfoundry/docusaurus-theme npm package
├── test-site/ # Local development/testing site
├── unified-doc/ # Unified documentation build system
├── docs-linter/ # Vale + markdownlint tooling
└── bootstrap.sh # New site bootstrapper
Install the theme in your Docusaurus project:
yarn add @netfoundry/docusaurus-themeAdd to your docusaurus.config.ts:
export default {
themes: ['@netfoundry/docusaurus-theme'],
themeConfig: {
netfoundry: {
showStarBanner: true,
starBanner: {
repoUrl: 'https://github.com/openziti/ziti',
label: 'Star OpenZiti on GitHub',
},
footer: {
description: 'Your site description.',
socialProps: {
githubUrl: 'https://github.com/your-org/',
},
},
},
},
};See the theme README for full documentation.
./bootstrap.sh /path/to/new-site [starLabel] [starRepoUrl]- Node.js 18+
- Yarn (
npm install -g yarn)
git clone https://github.com/netfoundry/docusaurus-shared.git
cd docusaurus-shared
yarn install
# Start development server
yarn dev
# Run tests
yarn test
# Build
yarn buildSee CONTRIBUTING.md for development setup, workflow, and a walkthrough example of making theme changes.
Use relative paths for internal links:
<!-- Do this -->
Here [is a link](../to/some/path.md)
<!-- Not this -->
Here [is a link](@site/to/some/path)
Here [is a link](/docs/to/some/path.md)Add images to the static folder scoped to your site:
/your-doc-site/static/img/your-doc-site/
Not directly in /static/img/ (reserved for shared images).
Use partials (files starting with _) sparingly:
import SharedContent from '../_shared.content.md'
<SharedContent />The docusaurus site is hosted on Kinsta. Required nginx rule:
location /docs/ {
try_files $uri $uri/ $uri/index.html /docs/index.html;
}
Apache-2.0