Skip to content

Commit

Permalink
chore: update update-example.js and generate markdown file
Browse files Browse the repository at this point in the history
  • Loading branch information
DBSDs committed Nov 14, 2023
1 parent cbd51fe commit 9d38cba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion docs/demo/custom-icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ nav:
path: /demo
---


<code src="../../examples/custom-icons.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demo/field-names.md → docs/demo/fieldNames.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: FieldNames
title: fieldNames
nav:
title: Demo
path: /demo
Expand Down
9 changes: 7 additions & 2 deletions update-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ paths.forEach(path => {
const name = path.split('/').pop().split('.')[0];
fs.writeFile(
`./docs/demo/${name}.md`,
`## ${name}
`---
title: ${name}
nav:
title: Demo
path: /demo
---
<code src="../../examples/${name}.tsx">
<code src="../../examples/${name}.tsx"></code>
`,
'utf8',
function(error) {
Expand Down

0 comments on commit 9d38cba

Please sign in to comment.