Skip to content
Merged
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
4 changes: 0 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ jobs:
working-directory: docs
run: npm ci

- name: Install Playwright (mermaid rendering)
working-directory: docs
run: npx playwright install --with-deps chromium

- name: Unit tests
working-directory: docs
run: npm test
Expand Down
11 changes: 5 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Then edit files under `src/content/docs/`. Astro reloads on save.

Relative to this directory:

- `astro.config.mjs` - Starlight + `@nebari/starlight` + `rehype-mermaid` + `remark-base-links`
- `astro.config.mjs` - Starlight + `@nebari/starlight` (also renders mermaid fences) + `remark-base-links`
- `package.json`, `tsconfig.json`, `.gitignore`
- `src/content.config.ts` - Starlight docs collection
- `src/content/docs/*.md` - actual pages (frontmatter required: `title`, `description`)
Expand All @@ -44,14 +44,13 @@ Related, at the repo root:
`scripts/check-links.sh`, or the workflow itself.

1. Node 22, `npm ci` in `docs/`.
2. Installs Playwright (for `rehype-mermaid`).
3. Runs `vitest` (the `remark-base-links` plugin test).
4. Computes `SITE`/`BASE` per event: on `main`, `BASE=/data-science-pack/`
2. Runs `vitest` (the `remark-base-links` plugin test).
3. Computes `SITE`/`BASE` per event: on `main`, `BASE=/data-science-pack/`
(served under the portal subpath); on a PR, `BASE=/` (the preview lives at
its own `*.pages.dev` subdomain).
5. Builds, then runs `scripts/check-links.sh` against `docs/dist/` - every
4. Builds, then runs `scripts/check-links.sh` against `docs/dist/` - every
internal `href`/`src` must resolve to a file.
6. Deploys `docs/dist/` to the `data-science-pack` Cloudflare Pages project
5. Deploys `docs/dist/` to the `data-science-pack` Cloudflare Pages project
with `wrangler pages deploy`. Main deploys to production; PRs deploy a
preview and get the URL posted as a sticky comment.

Expand Down
4 changes: 0 additions & 4 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import { nebari } from '@nebari/starlight';
import rehypeMermaid from 'rehype-mermaid';
import remarkBaseLinks from './src/plugins/remark-base-links';

// BASE and SITE are set by CI when deploying under a subpath
Expand Down Expand Up @@ -65,9 +64,6 @@ export default defineConfig({
}),
],
markdown: {
// Turn Shiki off for mermaid so rehype-mermaid sees the raw graph source.
syntaxHighlight: { type: 'shiki', excludeLangs: ['mermaid'] },
remarkPlugins: [[remarkBaseLinks, { base: process.env.BASE || '/' }]],
rehypePlugins: [[rehypeMermaid, { strategy: 'inline-svg' }]],
},
});
194 changes: 40 additions & 154 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@
"dependencies": {
"@astrojs/markdown-remark": "^7.3.0",
"@astrojs/starlight": "^0.41.10",
"@nebari/starlight": "^1.1.0",
"@nebari/starlight": "1.3.0",
"astro": "^7.2.9",
"rehype-mermaid": "3.0.0",
"sharp": "0.35.3"
},
"devDependencies": {
"playwright": "1.62.0",
"remark": "15.0.1",
"unist-util-visit": "5.1.0",
"vitest": "4.1.10"
Expand Down
Loading