Skip to content

Commit

Permalink
docs: use vitepress config for markdown pre-renderer (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Apr 13, 2022
1 parent bb2dfb6 commit 360bec7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
1 change: 0 additions & 1 deletion docs/.vitepress/.gitignore

This file was deleted.

30 changes: 30 additions & 0 deletions docs/.vitepress/api-pages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This file is automatically generated.
// Run 'pnpm run generate:api-docs' to update
export const apiPages = [
{ text: 'Address', link: '/api/address.html' },
{ text: 'Animal', link: '/api/animal.html' },
{ text: 'Commerce', link: '/api/commerce.html' },
{ text: 'Company', link: '/api/company.html' },
{ text: 'Database', link: '/api/database.html' },
{ text: 'Datatype', link: '/api/datatype.html' },
{ text: 'Date', link: '/api/date.html' },
{ text: 'Fake', link: '/api/fake.html' },
{ text: 'Finance', link: '/api/finance.html' },
{ text: 'Git', link: '/api/git.html' },
{ text: 'Hacker', link: '/api/hacker.html' },
{ text: 'Helpers', link: '/api/helpers.html' },
{ text: 'Image', link: '/api/image.html' },
{ text: 'Internet', link: '/api/internet.html' },
{ text: 'Localization', link: '/api/localization.html' },
{ text: 'Lorem', link: '/api/lorem.html' },
{ text: 'Mersenne', link: '/api/mersenne.html' },
{ text: 'Music', link: '/api/music.html' },
{ text: 'Name', link: '/api/name.html' },
{ text: 'Phone', link: '/api/phone.html' },
{ text: 'Random', link: '/api/random.html' },
{ text: 'System', link: '/api/system.html' },
{ text: 'Time', link: '/api/time.html' },
{ text: 'Unique', link: '/api/unique.html' },
{ text: 'Vehicle', link: '/api/vehicle.html' },
{ text: 'Word', link: '/api/word.html' },
];
7 changes: 2 additions & 5 deletions scripts/apidoc/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ import type {
Method,
MethodParameter,
} from '../../docs/.vitepress/components/api-docs/method';
import vitepressConfig from '../../docs/.vitepress/config';
import { faker } from '../../src';
import { formatTypescript, pathOutputDir } from './utils';
// TODO ST-DDT 2022-02-20: Actually import this/fix module import errors
// import vitepressConfig from '../../docs/.vitepress/config';

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

const markdown = createMarkdownRenderer(
pathOutputDir,
undefined,
// TODO ST-DDT 2022-02-20: Actually import this/fix module import errors
// vitepressConfig.markdown,
vitepressConfig.markdown,
'/'
);

Expand Down

0 comments on commit 360bec7

Please sign in to comment.