@jk2908/mdsrc 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ A Vite plugin for managing markdown content with type safety.
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm install @jk2908/mdsrc
|
|
8
|
+
npm install @jk2908/mdsrc
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
@@ -31,10 +31,10 @@ export default defineConfig({
|
|
|
31
31
|
|
|
32
32
|
The plugin reads markdown content, validates frontmatter against your schema, and generates typed modules during build and watch. Collection config currently uses `name`, `dir`, and `schema`.
|
|
33
33
|
|
|
34
|
-
If you configure a collection with `name: 'post'`, the generated module exports `allPosts` from the
|
|
34
|
+
If you configure a collection with `name: 'post'`, the generated module exports `allPosts` from the `.mdsrc` folder in the project root.
|
|
35
35
|
|
|
36
36
|
```ts
|
|
37
|
-
import { allPosts } from '
|
|
37
|
+
import { allPosts } from '.mdsrc'
|
|
38
38
|
|
|
39
39
|
export const summaries = allPosts.map(post => ({
|
|
40
40
|
title: post.title,
|