Skip to content

Commit 2ad96c5

Browse files
ST-DDTShinigami92
authored andcommitted
docs: automatically generate api docs from source (faker-js#289)
Co-authored-by: Shinigami <[email protected]>
1 parent 465065f commit 2ad96c5

18 files changed

+333
-1688
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ versions.json
7272
# Dist
7373
/dist
7474
/docs/.vitepress/dist
75+
/docs/api/typedoc.json
7576
/lib
7677

7778
# Faker

docs/.vitepress/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
api-pages.mjs

docs/.vitepress/config.mjs

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineConfig } from 'vitepress';
2+
import { apiPages } from './api-pages.mjs';
23

34
const nav = [
45
{ text: 'Guide', link: '/guide/' },
@@ -22,61 +23,7 @@ const sidebar = {
2223
},
2324
{
2425
text: 'API',
25-
children: [
26-
{
27-
text: 'Address',
28-
link: '/api/address',
29-
collapsable: false, // optional, defaults to true
30-
},
31-
{
32-
text: 'Commerce',
33-
link: '/api/commerce',
34-
},
35-
{
36-
text: 'Company',
37-
link: '/api/company',
38-
},
39-
{
40-
text: 'Database',
41-
link: '/api/database',
42-
},
43-
{
44-
text: 'Datatype',
45-
link: '/api/datatype',
46-
},
47-
{
48-
text: 'Date',
49-
link: '/api/date',
50-
},
51-
{
52-
text: 'Fake',
53-
link: '/api/fake',
54-
},
55-
{
56-
text: 'Finance',
57-
link: '/api/finance',
58-
},
59-
{
60-
text: 'Hacker',
61-
link: '/api/hacker',
62-
},
63-
{
64-
text: 'Helpers',
65-
link: '/api/helpers',
66-
},
67-
{
68-
text: 'Image',
69-
link: '/api/image',
70-
},
71-
{
72-
text: 'Internet',
73-
link: '/api/internet',
74-
},
75-
{
76-
text: 'Localization',
77-
link: '/api/localization',
78-
},
79-
],
26+
children: apiPages,
8027
},
8128
{
8229
text: 'Migrating from Faker v5',

docs/api/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.md
2+
!fake.md
3+
!localization.md

docs/api/address.md

Lines changed: 0 additions & 181 deletions
This file was deleted.

docs/api/commerce.md

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)