Skip to content

Commit

Permalink
chore: improve docs formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 8, 2024
1 parent 8801856 commit 816bebb
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/1.guide/4.generators.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generators

Automd uses an extendable system of generators that are responsible to maintain each `<-- automd` section.
Automd uses an extendable system of generators that are responsible to maintain each `<-- automd:name -->` section.

There are several available generators for automd each supporting different arguments.

Expand Down
20 changes: 12 additions & 8 deletions docs/2.generators/badges.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@ The `badges` generator generates badges for the latest npm version, npm download

## Usage

<!-- automd:badges color=yellow name=defu codecov bundlephobia -->
<!-- /automd -->
```md
<!-- automd:badges color=yellow name=defu codecov bundlephobia -->
<!-- /automd -->
```

**Updated Result:**

<!-- automd:badges color=yellow name=defu codecov bundlephobia -->
```md
<!-- automd:badges color=yellow name=defu codecov bundlephobia -->

[![npm version](https://flat.badgen.net/npm/v/defu?color=yellow)](https://npmjs.com/package/defu)
[![npm downloads](https://flat.badgen.net/npm/dm/defu?color=yellow)](https://npmjs.com/package/defu)
[![bundle size](https://flat.badgen.net/bundlephobia/minzip/defu?color=yellow)](https://bundlephobia.com/package/defu)
[![codecov](https://flat.badgen.net/codecov/c/github/unjs/automd?color=yellow)](https://codecov.io/gh/unjs/automd)
[![npm version](https://flat.badgen.net/npm/v/defu?color=yellow)](https://npmjs.com/package/defu)
[![npm downloads](https://flat.badgen.net/npm/dm/defu?color=yellow)](https://npmjs.com/package/defu)
[![bundle size](https://flat.badgen.net/bundlephobia/minzip/defu?color=yellow)](https://bundlephobia.com/package/defu)
[![codecov](https://flat.badgen.net/codecov/c/github/unjs/automd?color=yellow)](https://codecov.io/gh/unjs/automd)

<!-- /automd -->
<!-- /automd -->
```

## Arguments

Expand Down
25 changes: 15 additions & 10 deletions docs/2.generators/jsdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,31 @@ Internally it uses [untyped](https://untyped.unjs.io/) and [jiti](https://github

## Usage

<!-- automd:jsdocs src="./src/index" -->
<!-- /automd -->
```md
<!-- automd:jsdocs src="./src/index" -->
<!-- /automd -->
```

> [!NOTE]
> Make sure you have some utility exports in `src/index.ts` annotated with JSDocs.
**Updated Result:**

<!-- automd:jsdocs src="./src/index" -->
````md
<!-- automd:jsdocs src="./src/index" -->

### `add(a, b)`
### `add(a, b)`

Adds two numbers together.
Adds two numbers together.

**Example:**
```js
add(1, 2); // 3
```
**Example:**

<!-- /automd -->
```js
add(1, 2); // 3
```

<!-- /automd -->
````

## Arguments

Expand Down
6 changes: 4 additions & 2 deletions docs/2.generators/pm-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ The `pm-install` or `pm-i` generator generates installation commands for several

## Usage

<!-- automd:pm-install name=package-name dev -->
<!-- /automd -->
```md
<!-- automd:pm-install name=package-name dev -->
<!-- /automd -->
```

**Updated Result:**

Expand Down
6 changes: 4 additions & 2 deletions docs/2.generators/pm-x.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ The `pm-x` generator generates commands for running/executing a package through

## Usage

<!-- automd:pm-x name="package-name" args="[files] <flags>" -->
<!-- /automd -->
```md
<!-- automd:pm-x name="package-name" args="[files] <flags>" -->
<!-- /automd -->
```

**Updated Result:**

Expand Down

0 comments on commit 816bebb

Please sign in to comment.