Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docs.harvesterhci.io

This website is built using [Docusaurus 3](https://docusaurus.io/blog/releases/3.9), a modern
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern
static website generator.

## File Location
Expand Down Expand Up @@ -59,6 +59,21 @@ yarn build
This command generates static content into the `build` directory and can be
served using any static contents hosting service. The build may take a while.

### Generate PDF

First, the docs need to be served on a local dev server. You can do that with:

```console
yarn start > /dev/null 2>&1 &
```

When they are successfully generated and served at `localhost:3000` the PDF can
be generated with

```console
yarn gen-pdf-docs
```

## Deployment

```console
Expand Down
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
7 changes: 7 additions & 0 deletions docs/api/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"position": 19,
"label": "API",
"className": "hidden",
"collapsible": true,
"collapsed": true
}
2 changes: 1 addition & 1 deletion docs/troubleshooting/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ After you obtain a copy of the kubeconfig file, run the following script against

:::note

You must replace `<VIP>` with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
You must replace <VIP\> with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.

:::

Expand Down
35 changes: 24 additions & 11 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const {themes} = require('prism-react-renderer');
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

/** @type {import('@docusaurus/types').DocusaurusConfig} */
const config = {
Expand All @@ -12,11 +11,7 @@ const config = {
url: "https://docs.harvesterhci.io",
baseUrl: "/",
onBrokenLinks: "warn",
markdown: {
hooks: {
onBrokenMarkdownLinks: "warn",
},
},
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "harvester",
projectName: "docs",
Expand All @@ -32,9 +27,27 @@ const config = {
},
},
},
future: {
v4: true,
experimental_faster: true,
webpack: {
jsLoader: (isServer) => ({
loader: require.resolve("swc-loader"),
options: {
jsc: {
parser: {
syntax: "typescript",
tsx: true,
},
target: "es2019",
transform: {
react: {
runtime: "automatic",
},
},
},
module: {
type: isServer ? "commonjs" : "es6",
},
},
}),
},
themes: ["docusaurus-theme-openapi-docs"],
presets: [
Expand Down
25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@
"gen-pdf-docs": "docs-to-pdf docusaurus --initialDocURLs='http://localhost:3000' --contentSelector='article' --paginationSelector='a.pagination-nav__link.pagination-nav__link--next' --excludeSelectors='.margin-vert--xl a,[class^='tocCollapsible'],.breadcrumbs,.theme-edit-this-page' --excludePaths='/v1.3/api/' --protocolTimeout=360000 --outputPDFFilename=harvester.pdf"
},
"dependencies": {
"@docusaurus/core": "^3.9.0",
"@docusaurus/faster": "^3.9.0",
"@docusaurus/plugin-client-redirects": "^3.9.0",
"@docusaurus/plugin-content-blog": "^3.9.0",
"@docusaurus/plugin-content-docs": "^3.9.0",
"@docusaurus/plugin-content-pages": "^3.9.0",
"@docusaurus/plugin-debug": "^3.9.0",
"@docusaurus/preset-classic": "^3.9.0",
"@mdx-js/react": "^3.0.0",
"@docusaurus/core": "^2.4.0",
"@docusaurus/plugin-client-redirects": "^2.4.0",
"@docusaurus/plugin-content-blog": "^2.4.0",
"@docusaurus/plugin-content-docs": "^2.4.0",
"@docusaurus/plugin-content-pages": "^2.4.0",
"@docusaurus/plugin-debug": "^2.4.0",
"@docusaurus/preset-classic": "^2.4.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"docs-to-pdf": "^0.6.2",
"docusaurus-plugin-image-zoom": "^3.0.1",
"docusaurus-plugin-openapi-docs": "0.0.0-1092",
"docusaurus-theme-openapi-docs": "0.0.0-1092",
"prism-react-renderer": "^2.4.0",
"docusaurus-plugin-image-zoom": "^1.0.0",
"docusaurus-plugin-openapi-docs": "^2.1.2",
"docusaurus-theme-openapi-docs": "^2.1.2",
"prism-react-renderer": "^1.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remark-cli": "^11.0.0",
Expand Down
4 changes: 1 addition & 3 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

// @ts-check

const apiSidebar = require("./docs/api/sidebar.ts");

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
docs: [{ type: 'autogenerated', dirName: '.' }],
Expand All @@ -26,7 +24,7 @@ const sidebars = {
description:
"This is the API doc of the Harvester server. The APIs are broken down into the categories below:",
},
items: apiSidebar.default || apiSidebar,
items: require("./docs/api/sidebar.js"),
},
],
};
Expand Down
6 changes: 4 additions & 2 deletions src/theme/DocVersionBanner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import Translate from '@docusaurus/Translate';
import {
useActivePlugin,
useDocVersionSuggestions,
useDocsVersion,
useDocsPreferredVersion,
} from '@docusaurus/plugin-content-docs/client';
import {ThemeClassNames} from '@docusaurus/theme-common';
import {
useDocsPreferredVersion,
useDocsVersion,
} from '@docusaurus/theme-common/internal';
function UnreleasedVersionLabel({siteTitle, versionMetadata}) {
return (
<Translate
Expand Down
7 changes: 7 additions & 0 deletions versioned_docs/version-v1.4/api/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"position": 19,
"label": "API",
"className": "hidden",
"collapsible": true,
"collapsed": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ After you obtain a copy of the kubeconfig file, run the following script against

:::note

You must replace `<VIP>` with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
You must replace <VIP\> with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.

:::

Expand Down
7 changes: 7 additions & 0 deletions versioned_docs/version-v1.5/api/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"position": 19,
"label": "API",
"className": "hidden",
"collapsible": true,
"collapsed": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ After you obtain a copy of the kubeconfig file, run the following script against

:::note

You must replace `<VIP>` with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
You must replace <VIP\> with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.

:::

Expand Down
7 changes: 7 additions & 0 deletions versioned_docs/version-v1.6/api/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"position": 19,
"label": "API",
"className": "hidden",
"collapsible": true,
"collapsed": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ After you obtain a copy of the kubeconfig file, run the following script against

:::note

You must replace `<VIP>` with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
You must replace <VIP\> with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.

:::

Expand Down
7 changes: 7 additions & 0 deletions versioned_docs/version-v1.7/api/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"position": 19,
"label": "API",
"className": "hidden",
"collapsible": true,
"collapsed": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ After you obtain a copy of the kubeconfig file, run the following script against

:::note

You must replace `<VIP>` with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
You must replace <VIP\> with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.

:::

Expand Down
Loading