Skip to content

Commit 3552482

Browse files
committed
docs: update
1 parent bc0e4d2 commit 3552482

File tree

13 files changed

+31
-27
lines changed

13 files changed

+31
-27
lines changed

docs/.config/automd.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineGenerator, type Config } from "../../src";
2+
import { kebabCase } from "scule";
23

34
export default <Config>{
45
generators: {
@@ -13,16 +14,17 @@ export default <Config>{
1314
return k;
1415
}
1516
if (v === false) {
16-
k.startsWith("no-") ? k.slice(3) : `no-${k}`;
17+
return k.startsWith("no-") ? k.slice(3) : `no-${k}`;
1718
}
18-
return `${k}=${JSON.stringify(v)}`;
19+
return `${kebabCase(k)}=${JSON.stringify(v)}`;
1920
})
20-
.join(" ");
21+
.join(" ")
22+
.trim();
2123

2224
const input = `<!-- automd:${generator} ${argsString} -->\n<!-- /automd -->`;
2325
const output = (await transform(input)).contents;
2426
return {
25-
contents: `## Example\n\n### Input\n\n${_mdCode(input)}\n\n### Output\n\n${_mdCode(output)}`,
27+
contents: `### Input\n\n${_mdCode(input)}\n\n### Output\n\n${_mdCode(output)}`,
2628
};
2729
},
2830
}),

docs/.config/docs.jsonc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{
22
"$schema": "https://cdn.jsdelivr.net/gh/unjs/docs/schema/config.json",
33
"name": "AutoMD",
4-
"description": "your automated markdown maintainer.",
4+
"description": "your automated markdown maintainer....",
55
"shortDescription": "Markdown, Automated.",
6-
"github": "unjs/automd",
6+
"github": "unjs/automd2",
77
"url": "https://automd.unjs.io",
88
"redirects": {
99
"/generators": "/guide/generators",
1010
},
1111
"landing": {
12+
"contributors": true,
1213
"heroCode": "",
1314
"heroLinks": {},
1415
"features": [],
1516
},
17+
"automd": true,
1618
}

docs/2.generators/badges.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
The `badges` generator generates badges for the latest npm version, npm download statistics, code coverage, and bundle size.
44

5-
<!-- automd:example generator=badges color=yellow license name=defu codecov bundlephobia packagephobia -->
6-
75
## Example
86

7+
<!-- automd:example generator=badges color=yellow license name=defu codecov bundlephobia packagephobia -->
8+
99
### Input
1010

1111
<!-- automd:badges color="yellow" license name="defu" codecov bundlephobia packagephobia -->

docs/2.generators/contributors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
The `contributors` generator generates an image of contributors using [contrib.rocks](https://contrib.rocks/) service plus additional data about authors and license.
44

5-
<!-- automd:example generator=contributors author=pi0 license=MIT -->
6-
75
## Example
86

7+
<!-- automd:example generator=contributors author=pi0 license=MIT -->
8+
99
### Input
1010

1111
<!-- automd:contributors author="pi0" license="MIT" -->

docs/2.generators/fetch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
The `fetch` generator fetches a URL (using [unjs/ofetch](https://ofetch.unjs.io)) and inlines response body.
44

5-
<!-- automd:example generator=fetch url="gh:unjs/automd/main/test/fixture/TEST.md" -->
6-
75
## Example
86

7+
<!-- automd:example generator=fetch url="gh:unjs/automd/main/test/fixture/TEST.md" -->
8+
99
### Input
1010

1111
<!-- automd:fetch url="gh:unjs/automd/main/test/fixture/TEST.md" -->

docs/2.generators/file.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
The `file` generator reads a file and inlines it's contents.
44

5-
<!-- automd:example generator=file src="../test/fixture/TEST.md" -->
6-
75
## Example
86

7+
<!-- automd:example generator=file src="../test/fixture/TEST.md" -->
8+
99
### Input
1010

1111
<!-- automd:file src="../test/fixture/TEST.md" -->

docs/2.generators/jsdocs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ The `jsdocs` generator can automatically read through your code and extract and
44

55
Internally it uses [untyped](https://untyped.unjs.io/) and [jiti](https://github.com/unjs/jiti) loader for JSDocs parsing and TypeScript support.
66

7-
<!-- automd:example generator=jsdocs src="../test/fixture/src/index" -->
8-
97
## Example
108

9+
<!-- automd:example generator=jsdocs src="../test/fixture/src/index" -->
10+
1111
### Input
1212

1313
<!-- automd:jsdocs src="../test/fixture/src/index" -->

docs/2.generators/jsimport.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
The `jsimport` generator generates JavaScript usage example to be imported.
44

5-
<!-- automd:example cjs cdn generator=jsimport name=pkg imports="foo,bar" -->
6-
75
## Example
86

7+
<!-- automd:example cjs cdn generator=jsimport name=pkg imports="foo,bar" -->
8+
99
### Input
1010

1111
<!-- automd:jsimport cjs cdn name="pkg" imports="foo,bar" -->

docs/2.generators/pm-install.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
The `pm-install` or `pm-i` generator generates installation commands for several JavaScript package managers.
44

5-
<!-- automd:example generator=pm-install no-version name=package-name dev -->
6-
75
## Example
86

7+
<!-- automd:example generator=pm-install no-version name=package-name dev -->
8+
99
### Input
1010

11-
<!-- automd:pm-install version=false name="package-name" dev -->
11+
<!-- automd:pm-install no-version name="package-name" dev -->
1212
<!-- /automd -->
1313

1414
### Output
1515

16-
<!-- automd:pm-install version=false name="package-name" dev -->
16+
<!-- automd:pm-install no-version name="package-name" dev -->
1717

1818
```sh
1919
# ✨ Auto-detect

docs/2.generators/pm-x.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
The `pm-x` generator generates commands for running/executing a package through JavaScript package managers.
44

5-
<!-- automd:example generator=pm-x version=latest name="package-name" args="[files] <flags>" -->
6-
75
## Example
86

7+
<!-- automd:example generator=pm-x version=latest name="package-name" args="[files] <flags>" -->
8+
99
### Input
1010

1111
<!-- automd:pm-x version="latest" name="package-name" args="\"[files]" <flags>" -->

0 commit comments

Comments
 (0)