Skip to content

Commit a88df09

Browse files
committed
docs: migrate to docusaurus
1 parent 8fd6372 commit a88df09

Some content is hidden

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

44 files changed

+2029
-662
lines changed

.github/workflows/doc-publish.yml

Lines changed: 23 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -17,108 +17,52 @@ on:
1717

1818
# Gives the workflow permissions to clone the repo and create a page deployment
1919
permissions:
20-
id-token: write
20+
contents: read
2121
pages: write
22+
id-token: write
2223

23-
env:
24-
# Name of module and id separated by a slash
25-
INSTANCE: docs/docs
26-
INSTANCE_NAME: docs
27-
IS_GROUP: true
28-
# Replace HI with the ID of the instance in capital letters
29-
ARTIFACT: webHelpDOCS2-all.zip
30-
# Writerside docker image version
31-
# see https://www.jetbrains.com/help/writerside/deploy-docs-to-github-pages.html
32-
DOCKER_VERSION: '2025.04.8412'
24+
# Allow only one concurrent deployment
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
3328

3429
jobs:
3530
build:
3631
runs-on: ubuntu-latest
37-
outputs:
38-
config_json: ${{ steps.output-config-json.outputs.config_json }}
39-
32+
defaults:
33+
run:
34+
working-directory: ./docs
4035
steps:
4136
- name: Checkout repository
4237
uses: actions/checkout@v4
43-
44-
- name: Build Writerside docs using Docker
45-
uses: JetBrains/writerside-github-action@v4
46-
with:
47-
instance: ${{ env.INSTANCE }}
48-
artifact: ${{ env.ARTIFACT }}
49-
docker-version: ${{ env.DOCKER_VERSION }}
50-
is-group: ${{ env.IS_GROUP }}
51-
52-
- name: Upload documentation
53-
uses: actions/upload-artifact@v4
5438
with:
55-
name: docs
56-
path: |
57-
artifacts/${{ env.ARTIFACT }}
58-
artifacts/report.json
59-
retention-days: 7
39+
fetch-depth: 0
6040

61-
- name: Upload documentation test reports
62-
uses: actions/upload-artifact@v4
63-
if: ${{ always() }}
41+
- name: Setup Node.js
42+
uses: actions/setup-node@v4
6443
with:
65-
name: 'report.json'
66-
path: |
67-
artifacts/report.json
68-
retention-days: 7
44+
node-version: '18'
45+
cache: 'npm'
46+
cache-dependency-path: './docs/package-lock.json'
6947

70-
- name: Unzip artifact
71-
run: unzip -O UTF-8 -qq artifacts/${{ env.ARTIFACT }} -d dir
48+
- name: Install dependencies
49+
run: npm ci
7250

73-
- name: Output documentation config.json
74-
id: output-config-json
75-
run: |
76-
echo "config_json=$(cat dir/config.json)" >> $GITHUB_OUTPUT
77-
78-
# Add the job below and artifacts/report.json on Upload documentation step above if you want to fail the build when documentation contains errors
79-
test:
80-
# Requires build job results
81-
needs: build
82-
runs-on: ubuntu-latest
83-
84-
steps:
85-
- name: Download artifacts
86-
uses: actions/download-artifact@v4
87-
with:
88-
name: docs
89-
path: artifacts
51+
- name: Build Docusaurus site
52+
run: npm run build
9053

91-
- name: Test documentation
92-
uses: JetBrains/writerside-checker-action@v1
54+
- name: Upload artifact
55+
uses: actions/upload-pages-artifact@v3
9356
with:
94-
instance: ${{ env.INSTANCE }}
95-
is-group: ${{ env.IS_GROUP }}
57+
path: ./docs/build
9658

9759
deploy:
9860
environment:
9961
name: github-pages
10062
url: ${{ steps.deployment.outputs.page_url }}
101-
# Requires the build job results
102-
needs: test
63+
needs: build
10364
runs-on: ubuntu-latest
10465
steps:
105-
- name: Download artifact
106-
uses: actions/download-artifact@v4
107-
with:
108-
name: docs
109-
path: artifacts
110-
111-
- name: Unzip artifact
112-
run: unzip -O UTF-8 -qq artifacts/${{ env.ARTIFACT }} -d dir
113-
114-
- name: Setup Pages
115-
uses: actions/configure-pages@v5
116-
117-
- name: Upload artifact
118-
uses: actions/upload-pages-artifact@v3
119-
with:
120-
path: dir
121-
12266
- name: Deploy to GitHub Pages
12367
id: deployment
12468
uses: actions/deploy-pages@v4

.github/workflows/doc-test.yml

Lines changed: 15 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -9,78 +9,27 @@ on:
99
# Specify to run a workflow manually from the Actions tab on GitHub
1010
workflow_dispatch:
1111

12-
env:
13-
# Name of module and id separated by a slash
14-
INSTANCE: docs/docs
15-
# Replace HI with the ID of the instance in capital letters
16-
ARTIFACT: webHelpDOCS2-all.zip
17-
# Writerside docker image version
18-
DOCKER_VERSION: '2025.04.8412'
19-
# Add the variable below to upload Algolia indexes
20-
# Replace HI with the ID of the instance in capital letters
21-
# ALGOLIA_ARTIFACT: algolia-indexes-HI.zip
22-
IS_GROUP: true
23-
2412
jobs:
25-
build:
13+
test:
14+
name: Test Docusaurus build
2615
runs-on: ubuntu-latest
27-
16+
defaults:
17+
run:
18+
working-directory: ./docs
2819
steps:
2920
- name: Checkout repository
3021
uses: actions/checkout@v4
31-
32-
- name: Build Writerside docs using Docker
33-
uses: JetBrains/writerside-github-action@v4
34-
with:
35-
instance: ${{ env.INSTANCE }}
36-
artifact: ${{ env.ARTIFACT }}
37-
docker-version: ${{ env.DOCKER_VERSION }}
38-
is-group: ${{ env.IS_GROUP }}
39-
40-
- name: Upload documentation
41-
uses: actions/upload-artifact@v4
42-
with:
43-
name: docs
44-
path: |
45-
artifacts/${{ env.ARTIFACT }}
46-
artifacts/report.json
47-
retention-days: 7
48-
49-
- name: Upload documentation test reports
50-
uses: actions/upload-artifact@v4
51-
if: ${{ always() }}
5222
with:
53-
name: 'report.json'
54-
path: |
55-
artifacts/report.json
56-
retention-days: 7
57-
58-
# Add the job below and artifacts/report.json on Upload documentation step above if you want to fail the build when documentation contains errors
59-
test:
60-
name: Test documentation built
61-
# Requires build job results
62-
needs: build
63-
runs-on: ubuntu-latest
64-
65-
steps:
66-
- name: Download artifacts
67-
uses: actions/download-artifact@v4
68-
with:
69-
name: docs
70-
path: artifacts
71-
72-
- name: Test documentation
73-
uses: JetBrains/writerside-checker-action@v1
23+
fetch-depth: 0
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
7426
with:
75-
instance: ${{ env.INSTANCE }}
76-
is-group: ${{ env.IS_GROUP }}
27+
node-version: '18'
28+
cache: 'npm'
29+
cache-dependency-path: './docs/package-lock.json'
7730

78-
- name: Unzip artifact
79-
run: unzip -O UTF-8 -qq artifacts/${{ env.ARTIFACT }} -d dir
31+
- name: Install dependencies
32+
run: npm ci
8033

81-
- name: Upload dist
82-
uses: actions/upload-artifact@v4
83-
with:
84-
name: dist
85-
path: dir
86-
retention-days: 7
34+
- name: Build Docusaurus site
35+
run: npm run build
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Configuration",
3+
"position": 4,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Configuration options for the Kotlin Suspend Transform Compiler Plugin"
7+
}
8+
}

docs/docs/configuration/custom-transformers.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
---
22
id: custom-transformers
33
title: Custom Transformers
4+
sidebar_position: 3
45
---
56

7+
import { Badge } from '@site/src/components/Snippets';
8+
69
This guide covers how to create custom transformers when the default transformers don't meet your specific needs.
710

811
## Overview
@@ -436,7 +439,7 @@ addCopyAnnotationExclude {
436439

437440
## Others
438441
### MarkName
439-
<span className="badge badge--secondary">Version 0.13.0</span>
442+
<Badge type="secondary">Version 0.13.0</Badge>
440443

441444
For configuration of `markName` in custom annotations,
442445
refer to [Mark Name](../features/mark-name#customize).

docs/docs/configuration/default-transformers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
id: default-transformers
33
title: Default Transformers
4+
sidebar_position: 2
45
---
56

67
import Tabs from '@theme/Tabs';

docs/docs/configuration/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Configuration
3+
sidebar_position: 1
34
---
45

56
This guide covers how to configure the Kotlin Suspend Transform Compiler Plugin extension.

docs/docs/features/_category_.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Features",
3+
"position": 5,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Features of the Kotlin Suspend Transform Compiler Plugin"
7+
}
8+
}

docs/docs/features/mark-name.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
id: mark-name
33
title: MarkName
4+
sidebar_position: 1
45
---
56

67
import Tabs from '@theme/Tabs';
78
import TabItem from '@theme/TabItem';
9+
import { Badge } from '@site/src/components/Snippets';
810

9-
<span className="badge badge--primary">Experimental</span>
10-
<span className="badge badge--secondary">Version 0.13.0</span>
11+
<Badge type="primary">Experimental</Badge>
12+
<Badge type="secondary">Version 0.13.0</Badge>
1113

1214
You can use `markName` to add a name mark annotation (e.g. `@JvmName`, `@JsName`) to the generated synthetic function.
1315

docs/docs/getting-started.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22
id: getting-started
33
title: Getting Started
4+
sidebar_position: 3
45
---
56

67
import Tabs from '@theme/Tabs';
78
import TabItem from '@theme/TabItem';
9+
import { Badge } from '@site/src/components/Snippets';
810

911
This guide will walk you through the basic usage of the Kotlin Suspend Transform Compiler Plugin across different platforms.
1012

@@ -120,8 +122,8 @@ class Foo {
120122
121123
## WasmJS Platform
122124

123-
<span className="badge badge--primary">Experimental</span>
124-
<span className="badge badge--secondary">Version 0.6.0</span>
125+
<Badge type="primary">Experimental</Badge>
126+
<Badge type="secondary">Version 0.6.0</Badge>
125127

126128
:::warning
127129
The transformer functions mentioned in the WasmJS example below

docs/docs/installation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
id: installation
33
title: Installation
4+
sidebar_position: 2
45
---
56

67
import Tabs from '@theme/Tabs';

0 commit comments

Comments
 (0)