diff options
| author | ST-DDT <[email protected]> | 2023-04-03 17:39:43 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-03 17:39:43 +0200 |
| commit | edc50b69197260f9d3e8ac22f2bf062c9a71c390 (patch) | |
| tree | 9e7c0b38361fbfefa66bc30eb68097d585420178 /docs | |
| parent | 34b743ab8a859669a0f7b37910c2cbb9e294b534 (diff) | |
| download | faker-edc50b69197260f9d3e8ac22f2bf062c9a71c390.tar.xz faker-edc50b69197260f9d3e8ac22f2bf062c9a71c390.zip | |
docs: Faker and utility pages (#1940)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/.vitepress/api-pages.ts | 2 | ||||
| -rw-r--r-- | docs/.vitepress/components/api-docs/method.ts | 1 | ||||
| -rw-r--r-- | docs/.vitepress/components/api-docs/method.vue | 3 | ||||
| -rw-r--r-- | docs/api/ApiIndex.vue | 6 |
4 files changed, 7 insertions, 5 deletions
diff --git a/docs/.vitepress/api-pages.ts b/docs/.vitepress/api-pages.ts index dc622357..f0858635 100644 --- a/docs/.vitepress/api-pages.ts +++ b/docs/.vitepress/api-pages.ts @@ -2,6 +2,7 @@ // Run 'pnpm run generate:api-docs' to update export const apiPages = [ { text: 'Overview', link: '/api/' }, + { text: 'Faker', link: '/api/faker.html' }, { text: 'Airline', link: '/api/airline.html' }, { text: 'Animal', link: '/api/animal.html' }, { text: 'Color', link: '/api/color.html' }, @@ -28,4 +29,5 @@ export const apiPages = [ { text: 'System', link: '/api/system.html' }, { text: 'Vehicle', link: '/api/vehicle.html' }, { text: 'Word', link: '/api/word.html' }, + { text: 'Utilities', link: '/api/utils.html' }, ]; diff --git a/docs/.vitepress/components/api-docs/method.ts b/docs/.vitepress/components/api-docs/method.ts index 562d1ecf..6601a5ca 100644 --- a/docs/.vitepress/components/api-docs/method.ts +++ b/docs/.vitepress/components/api-docs/method.ts @@ -1,6 +1,5 @@ export interface Method { readonly name: string; - readonly title: string; readonly description: string; // HTML readonly parameters: MethodParameter[]; readonly returns: string; diff --git a/docs/.vitepress/components/api-docs/method.vue b/docs/.vitepress/components/api-docs/method.vue index 6753cefd..38d10586 100644 --- a/docs/.vitepress/components/api-docs/method.vue +++ b/docs/.vitepress/components/api-docs/method.vue @@ -8,6 +8,9 @@ const props = defineProps<{ method: Method }>(); function seeAlsoToUrl(see: string): string { const [, module, method] = see.replace(/\(.*/, '').split('\.'); + if (!method) { + return 'faker.html#' + slugify(module); + } return module + '.html#' + slugify(method); } </script> diff --git a/docs/api/ApiIndex.vue b/docs/api/ApiIndex.vue index 55efaeca..6500ae69 100644 --- a/docs/api/ApiIndex.vue +++ b/docs/api/ApiIndex.vue @@ -97,13 +97,11 @@ onUnmounted(() => window.removeEventListener('keydown', apiSearchFocusHandler)); <div class="api-groups"> <div v-for="item of section.items" :key="item.text" class="api-group"> <h3> - <a :href="item.link + '.html'">{{ item.text }}</a> + <a :href="item.link">{{ item.text }}</a> </h3> <ul> <li v-for="h of item.headers" :key="h.anchor"> - <a :href="item.link + '.html#' + slugify(h.anchor)">{{ - h.text - }}</a> + <a :href="item.link + '#' + slugify(h.anchor)">{{ h.text }}</a> </li> </ul> </div> |
