Skip to content

Commit 360bec7

Browse files
authored
docs: use vitepress config for markdown pre-renderer (#835)
1 parent bb2dfb6 commit 360bec7

3 files changed

Lines changed: 32 additions & 6 deletions

File tree

docs/.vitepress/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/.vitepress/api-pages.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// This file is automatically generated.
2+
// Run 'pnpm run generate:api-docs' to update
3+
export const apiPages = [
4+
{ text: 'Address', link: '/api/address.html' },
5+
{ text: 'Animal', link: '/api/animal.html' },
6+
{ text: 'Commerce', link: '/api/commerce.html' },
7+
{ text: 'Company', link: '/api/company.html' },
8+
{ text: 'Database', link: '/api/database.html' },
9+
{ text: 'Datatype', link: '/api/datatype.html' },
10+
{ text: 'Date', link: '/api/date.html' },
11+
{ text: 'Fake', link: '/api/fake.html' },
12+
{ text: 'Finance', link: '/api/finance.html' },
13+
{ text: 'Git', link: '/api/git.html' },
14+
{ text: 'Hacker', link: '/api/hacker.html' },
15+
{ text: 'Helpers', link: '/api/helpers.html' },
16+
{ text: 'Image', link: '/api/image.html' },
17+
{ text: 'Internet', link: '/api/internet.html' },
18+
{ text: 'Localization', link: '/api/localization.html' },
19+
{ text: 'Lorem', link: '/api/lorem.html' },
20+
{ text: 'Mersenne', link: '/api/mersenne.html' },
21+
{ text: 'Music', link: '/api/music.html' },
22+
{ text: 'Name', link: '/api/name.html' },
23+
{ text: 'Phone', link: '/api/phone.html' },
24+
{ text: 'Random', link: '/api/random.html' },
25+
{ text: 'System', link: '/api/system.html' },
26+
{ text: 'Time', link: '/api/time.html' },
27+
{ text: 'Unique', link: '/api/unique.html' },
28+
{ text: 'Vehicle', link: '/api/vehicle.html' },
29+
{ text: 'Word', link: '/api/word.html' },
30+
];

scripts/apidoc/signature.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ import type {
1414
Method,
1515
MethodParameter,
1616
} from '../../docs/.vitepress/components/api-docs/method';
17+
import vitepressConfig from '../../docs/.vitepress/config';
1718
import { faker } from '../../src';
1819
import { formatTypescript, pathOutputDir } from './utils';
19-
// TODO ST-DDT 2022-02-20: Actually import this/fix module import errors
20-
// import vitepressConfig from '../../docs/.vitepress/config';
2120

2221
export function prettifyMethodName(method: string): string {
2322
return (
@@ -36,9 +35,7 @@ export function toBlock(comment?: Comment): string {
3635

3736
const markdown = createMarkdownRenderer(
3837
pathOutputDir,
39-
undefined,
40-
// TODO ST-DDT 2022-02-20: Actually import this/fix module import errors
41-
// vitepressConfig.markdown,
38+
vitepressConfig.markdown,
4239
'/'
4340
);
4441

0 commit comments

Comments
 (0)