Skip to content

Commit 3d1c959

Browse files
committed
Fix incompatibilities between docusaurus 2 to 3
Fix generators, for example only 6 #'s are allowed now. Signed-off-by: Ryan Swanson <ryan.swanson@loft.sh>
1 parent 7f9a798 commit 3d1c959

51 files changed

Lines changed: 718 additions & 1272 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

devspace-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@
452452
"properties": {
453453
"command": {
454454
"type": "string",
455-
"description": "Command to execute to build the image. You can use ${runtime.images.my-image.image} and ${runtime.image.my-image.tag}\nto reference the image and tag that should get built."
455+
"description": "Command to execute to build the image. You can use `${runtime.images.my-image.image}` and `${runtime.images.my-image.tag}`\nto reference the image and tag that should get built."
456456
},
457457
"onChange": {
458458
"oneOf": [
@@ -3513,7 +3513,7 @@
35133513
},
35143514
"initialSync": {
35153515
"type": "string",
3516-
"description": "InitialSync defines the initial sync strategy to use when this sync starts. Defaults to mirrorLocal",
3516+
"description": "InitialSync defines the initial sync strategy to use when this sync starts. Defaults to mirrorLocal.\nYou can completely disable this using the `initialSync: disabled` option.",
35173517
"group": "initial_sync",
35183518
"group_name": "Initial Sync"
35193519
},

docs/.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.16
1+
20

docs/docusaurus.config.js

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ module.exports = {
77
tagline: 'The tagline of my site',
88
url: 'https://devspace.sh',
99
baseUrl: __webpack_public_path__,
10+
markdown: {
11+
mdx1Compat: {
12+
headingIds: true,
13+
},
14+
},
1015
favicon: '/img/favicon.png',
1116
organizationName: 'loft-sh', // Usually your GitHub org/user name.
1217
projectName: 'devspace', // Usually your repo name.
@@ -84,39 +89,6 @@ module.exports = {
8489
path: ""
8590
}
8691
},
87-
remarkPlugins: [
88-
[
89-
require('mdx-mermaid'),
90-
{
91-
mermaid: {
92-
securityLevel: "loose",
93-
theme: 'neutral',
94-
themeVariables: {
95-
primaryColor: '#00bdff',
96-
lineColor: '#bdd6f3',
97-
arrowheadColor: '#bdd6f3',
98-
mainBkg: '#6c89ad',
99-
contrast: '#3e5371',
100-
textColor: '#fff',
101-
primaryTextColor: '#fff',
102-
secondaryTextColor: '#fff',
103-
tertiaryTextColor: '#fff',
104-
border1: 'transparent',
105-
border2: 'transparent',
106-
clusterBkg: 'transparent',
107-
clusterBorder: '#bdd6f3',
108-
edgeLabelBackground: '#bcd6f3',
109-
110-
},
111-
flowchart: {
112-
curve: 'basis',
113-
nodeSpacing: 20,
114-
rankSpacing: 50,
115-
}
116-
}
117-
}
118-
]
119-
],
12092
},
12193
theme: {
12294
customCss: resolveGlob.sync(['./src/css/**/*.scss']),

docs/hack/util/schema.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func GenerateReference(schema *jsonschema.Schema, basePath string) {
7575
func createSections(basePath, prefix string, schema *jsonschema.Schema, definitions jsonschema.Definitions, depth int, parentIsNameObjectMap bool) string {
7676
partialImports := &[]string{}
7777
content := ""
78-
headlinePrefix := strings.Repeat("#", depth+1) + " "
78+
headlinePrefix := headingPrefix(depth)
7979
anchorPrefix := strings.TrimPrefix(strings.ReplaceAll(prefix, prefixSeparator, anchorSeparator), anchorSeparator)
8080

8181
groups := map[string]*Group{}
@@ -277,6 +277,14 @@ func createSections(basePath, prefix string, schema *jsonschema.Schema, definiti
277277
return content
278278
}
279279

280+
func headingPrefix(depth int) string {
281+
headingLevel := depth + 1
282+
if headingLevel > 6 {
283+
headingLevel = 6
284+
}
285+
return strings.Repeat("#", headingLevel) + " "
286+
}
287+
280288
func GetEumValues(fieldSchema *jsonschema.Schema, required bool, fieldDefault *string) string {
281289
enumValues := ""
282290
if fieldSchema.Enum != nil {

docs/hack/util/schema_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package util
2+
3+
import "testing"
4+
5+
func TestHeadingPrefixCapsAtLevelSix(t *testing.T) {
6+
testCases := []struct {
7+
name string
8+
depth int
9+
expected string
10+
}{
11+
{name: "top level", depth: 1, expected: "## "},
12+
{name: "sixth level", depth: 5, expected: "###### "},
13+
{name: "deeper than six", depth: 8, expected: "###### "},
14+
}
15+
16+
for _, testCase := range testCases {
17+
t.Run(testCase.name, func(t *testing.T) {
18+
if actual := headingPrefix(testCase.depth); actual != testCase.expected {
19+
t.Fatalf("headingPrefix(%d) = %q, want %q", testCase.depth, actual, testCase.expected)
20+
}
21+
})
22+
}
23+
}

docs/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "devspace-cloud",
33
"version": "0.0.0",
44
"private": true,
5+
"engines": {
6+
"node": ">=20.0"
7+
},
58
"scripts": {
69
"start": "docusaurus start",
710
"build": "docusaurus build",
@@ -15,11 +18,9 @@
1518
"classnames": "^2.2.6",
1619
"docusaurus-plugin-sass": "^0.2.6",
1720
"mdx-link-checker": "^0.1.1",
18-
"mdx-mermaid": "^v1.3.0",
19-
"mermaid": "^11.12.3",
2021
"plugin-image-zoom": "ataft/plugin-image-zoom",
21-
"react": "^17.0.2",
22-
"react-dom": "^17.0.2",
22+
"react": "^18.2.0",
23+
"react-dom": "^18.2.0",
2324
"redocusaurus": "^2.1.1",
2425
"resolve-glob": "^1.0.0",
2526
"sass": "^1.93.2"

docs/pages/_partials/workflow-replace-tags.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ Replacing or appending tags to images that are used in your deployments makes su
88

99
DevSpace will replace the following things:
1010
- **registry.url/repo/name** that corresponds to a `images.*.image`, will be rewritten to `registry.url/repo/name:generated_tag`
11-
- **${runtime.images.image-key.image}** that corresponds to a `images.*` key, will be rewritten to `registry.url/repo/name`. You can also use dependency images here with `${runtime.dependencies.dep1.images.dep-image.image}`
12-
- **${runtime.images.image-key.tag}** that corresponds to a `images.*` key, will be rewritten to `generated_tag`. You can also use dependency images here with `${runtime.dependencies.dep1.images.dep-image.tag}`
13-
11+
- **`${runtime.images.image-key.image}`** that corresponds to a `images.*` key, will be rewritten to `registry.url/repo/name`. You can also use dependency images here with `${runtime.dependencies.dep1.images.dep-image.image}`
12+
- **`${runtime.images.image-key.tag}`** that corresponds to a `images.*` key, will be rewritten to `generated_tag`. You can also use dependency images here with `${runtime.dependencies.dep1.images.dep-image.tag}`

docs/pages/configuration/_partials/v2beta1/dev/containers/persistPaths/initContainer/resources/limits.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<details className="config-field" data-expandable="false" open>
33
<summary>
44

5-
####### `limits` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">&lt;limit_name&gt;:string</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#dev-containers-persistPaths-initContainer-resources-limits}
5+
###### `limits` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">&lt;limit_name&gt;:string</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#dev-containers-persistPaths-initContainer-resources-limits}
66

77
Limits are the limits part of the resources
88

docs/pages/configuration/_partials/v2beta1/dev/containers/persistPaths/initContainer/resources/requests.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<details className="config-field" data-expandable="false" open>
33
<summary>
44

5-
####### `requests` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">&lt;request_name&gt;:string</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#dev-containers-persistPaths-initContainer-resources-requests}
5+
###### `requests` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">&lt;request_name&gt;:string</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#dev-containers-persistPaths-initContainer-resources-requests}
66

77
Requests are the requests part of the resources
88

docs/pages/configuration/_partials/v2beta1/dev/containers/sync/initialSync.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
##### `initialSync` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">string</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#dev-containers-sync-initialSync}
66

7-
InitialSync defines the initial sync strategy to use when this sync starts. Defaults to mirrorLocal
7+
InitialSync defines the initial sync strategy to use when this sync starts. Defaults to mirrorLocal.
88
You can completely disable this using the `initialSync: disabled` option.
99

1010
</summary>

0 commit comments

Comments
 (0)