-
Notifications
You must be signed in to change notification settings - Fork 55
Migrate docs from mdbook to docusaurus #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c13e96e
chore: migrate docs from mdbook to docusaurus
Keinberger 8e19566
docs: remove redundant sidebar explainer comments
Keinberger f018cfe
docs: fix naming for compiler md page
Keinberger f3cad5c
chore(Makefile): add commands for serving local docs
Keinberger 08df0ed
chore: amend category Docusaurus files to YML to support comments
Keinberger 0ac2eee
docs(README): add docs section explainer
Keinberger fcc8d18
chore: add build-docs workflow to check Docusaurus md syntax
Keinberger f36cb3e
chore: use specific ref for trigger deploy docs workflow
Keinberger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: build-docs | ||
|
|
||
| # Limits workflow concurrency to only the latest commit in the PR. | ||
| concurrency: | ||
| group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, next] | ||
| paths: | ||
| - "docs/external/**" | ||
| - ".github/workflows/build-docs.yml" | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| paths: | ||
| - "docs/external/**" | ||
| - ".github/workflows/build-docs.yml" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-docs: | ||
| name: Build Documentation | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" | ||
| cache: "npm" | ||
| cache-dependency-path: docs/external/package-lock.json | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: ./docs/external | ||
| run: npm ci | ||
|
|
||
| - name: Build documentation | ||
| working-directory: ./docs/external | ||
| run: npm run build:dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Trigger Aggregator Docs Rebuild | ||
|
|
||
| on: | ||
| push: | ||
| branches: [next] | ||
| paths: | ||
| - "docs/external/**" | ||
|
|
||
| jobs: | ||
| notify: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Send repository_dispatch to aggregator | ||
| uses: peter-evans/repository-dispatch@a628c95fd17070f003ea24579a56e6bc89b25766 | ||
| with: | ||
| # PAT (Personal Access Token) that grants permission to trigger the rebuild workflow at the docs repository | ||
| token: ${{ secrets.DOCS_REPO_TOKEN }} | ||
| repository: ${{ vars.DOCS_AGGREGATOR_REPO }} | ||
| event-type: rebuild | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| .docusaurus/ | ||
| build/ | ||
| node_modules/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import type { Config } from "@docusaurus/types"; | ||
|
|
||
| // If your content lives in docs/src, set DOCS_PATH='src'; else '.' | ||
| const DOCS_PATH = | ||
| process.env.DOCS_PATH || (require("fs").existsSync("src") ? "src" : "."); | ||
|
|
||
| const config: Config = { | ||
| title: "Docs Dev Preview", | ||
| url: "http://localhost:3000", | ||
| baseUrl: "/", | ||
| trailingSlash: false, | ||
|
|
||
| // Minimal classic preset: docs only, autogenerated sidebars, same math plugins as prod | ||
| presets: [ | ||
| [ | ||
| "classic", | ||
| { | ||
| docs: { | ||
| path: DOCS_PATH, // '../docs' is implied because we are already inside docs/ | ||
| routeBasePath: "/", // mount docs at root for quick preview | ||
| sidebarPath: "./sidebars.ts", | ||
| remarkPlugins: [require("remark-math")], | ||
| rehypePlugins: [require("rehype-katex")], | ||
| }, | ||
| blog: false, | ||
| pages: false, | ||
| }, | ||
| ], | ||
| ], | ||
| }; | ||
| export default config; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to only trigger this workflow if files in the
docsdirectory change, no?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely agreed, will fix!