Skip to content

Commit

Permalink
chore: setup starlight-typedoc
Browse files Browse the repository at this point in the history
This is currently broken due to HiDeoo/starlight-typedoc#23

To run example:

1. Clone repo
2. Checkout this branch (`boneskull/starlight-typedoc`)
3. Run `npm install`
4. Run `npm run dev:docs`

This should fail without any obvious error; this is because of the check for `groups` in `starlight-typedoc`.

You can also run `npm exec typedoc` from the workspace root to see that the problem is unique to `starlight-typedoc`.
  • Loading branch information
boneskull committed Jan 3, 2024
1 parent 831ae53 commit 87c54a3
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 12 deletions.
47 changes: 37 additions & 10 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"build": "tsc -b",
"clean": "tsc -b --clean",
"dev": "tsc -b --watch",
"dev:docs": "npx docsify-cli serve docs",
"docs:build": "shx cp ./packages/midnight-smoker/README.md ./docs/README.md",
"dev:docs": "npm run -w packages/docs dev",
"husky-install": "husky install",
"lint": "run-p lint:eslint lint:md lint:deps",
"lint:commit": "commitlint",
Expand Down
16 changes: 16 additions & 0 deletions packages/docs/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {defineConfig} from 'astro/config';
import path from 'node:path';
import {fileURLToPath} from 'node:url';
import remarkCodeImport from 'remark-code-import';
import starlightTypeDocPlugin, {typeDocSidebarGroup} from 'starlight-typedoc';
import {rehypeAutolink} from './plugin/rehype-autolink';

const __filename = fileURLToPath(import.meta.url);
Expand Down Expand Up @@ -52,10 +53,25 @@ export default defineConfig({
{label: 'Creating Reporters', link: '/developer/plugin-reporter'},
],
},
typeDocSidebarGroup,
],
components: {
Footer: './src/components/Footer.astro',
},
plugins: [
starlightTypeDocPlugin({
entryPoints: [
'../midnight-smoker',
'../plugin-default',
'../test-util',
],
typeDoc: {
entryPointStrategy: 'packages',
plugin: ['typedoc-plugin-zod'],
},
tsconfig: '../../tsconfig.json',
}),
],
}),
],
markdown: {
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"rehype-autolink-headings": "7.1.0",
"remark-code-import": "1.2.0",
"sharp": "0.32.6",
"starlight-typedoc": "0.7.0",
"typedoc": "0.25.4",
"typedoc-plugin-markdown": "4.0.0-next.38",
"typedoc-plugin-zod": "1.1.1",
"unified": "11.0.4",
"unist-util-visit": "5.0.0"
},
Expand Down

0 comments on commit 87c54a3

Please sign in to comment.