diff options
| author | ST-DDT <[email protected]> | 2022-04-13 10:01:23 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-13 10:01:23 +0200 |
| commit | 360bec7c7f3269049eb748523f2d271b6ed36d75 (patch) | |
| tree | 171c4fd81486e9d769cb103c284720aa4defcb81 | |
| parent | bb2dfb6f0e9d906120c49b7ee38e05e05fd8fc45 (diff) | |
| download | faker-360bec7c7f3269049eb748523f2d271b6ed36d75.tar.xz faker-360bec7c7f3269049eb748523f2d271b6ed36d75.zip | |
docs: use vitepress config for markdown pre-renderer (#835)
| -rw-r--r-- | docs/.vitepress/.gitignore | 1 | ||||
| -rw-r--r-- | docs/.vitepress/api-pages.ts | 30 | ||||
| -rw-r--r-- | scripts/apidoc/signature.ts | 7 |
3 files changed, 32 insertions, 6 deletions
diff --git a/docs/.vitepress/.gitignore b/docs/.vitepress/.gitignore deleted file mode 100644 index 3b0c8abc..00000000 --- a/docs/.vitepress/.gitignore +++ /dev/null @@ -1 +0,0 @@ -api-pages.ts diff --git a/docs/.vitepress/api-pages.ts b/docs/.vitepress/api-pages.ts new file mode 100644 index 00000000..88f6c48e --- /dev/null +++ b/docs/.vitepress/api-pages.ts @@ -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' }, +]; diff --git a/scripts/apidoc/signature.ts b/scripts/apidoc/signature.ts index 91691e69..0341d7c0 100644 --- a/scripts/apidoc/signature.ts +++ b/scripts/apidoc/signature.ts @@ -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 ( @@ -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, '/' ); |
