@san-siva/blogkit-md 0.2.2 → 0.2.5

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 CHANGED
@@ -1,44 +1,14 @@
1
1
  ---
2
2
  title: blogkit-md
3
- description: A Next.js tool that converts standard markdown files into rendered blog posts for `@san-siva/blogkit`.
3
+ description: A React component library that converts markdown files into rendered blog posts for `@san-siva/blogkit`.
4
4
  ---
5
5
 
6
- A Next.js tool that converts standard markdown files into rendered blog posts for [`@san-siva/blogkit`](https://blogkit.santhoshsiva.dev).
6
+ A React component library that converts markdown files into rendered blog posts for [`@san-siva/blogkit`](https://blogkit.santhoshsiva.dev).
7
7
 
8
- > This README is automatically rendered as a live demo at [blogkit-md.santhoshsiva.dev](https://blogkit-md.santhoshsiva.dev)
8
+ > Live preview of this README is available here [blogkit-md.santhoshsiva.dev](https://blogkit-md.santhoshsiva.dev)
9
9
 
10
10
  ## Getting started
11
11
 
12
- ```bash
13
- git clone https://github.com/san-siva/blogkit-md.git
14
- npm install
15
- ```
16
-
17
- ### Dev server
18
-
19
- ```bash
20
- npm run dev # uses data/test.md by default
21
- npm run dev -- --file=data/my-post.md # specify a markdown file
22
- ```
23
-
24
- The dev server watches the markdown file for changes and auto-reloads the browser via HMR.
25
-
26
- ### Build
27
-
28
- ```bash
29
- npm run build
30
- npm run start
31
- ```
32
-
33
- ### Lint
34
-
35
- ```bash
36
- npm run lint # check
37
- npm run fix # auto-fix
38
- ```
39
-
40
- ## Using BlogPost in your own Next.js app
41
-
42
12
  `blogkit-md` exposes a `BlogPost` server component you can drop into any Next.js project.
43
13
 
44
14
  ### Install
@@ -47,20 +17,6 @@ npm run fix # auto-fix
47
17
  npm install @san-siva/blogkit-md
48
18
  ```
49
19
 
50
- Or as a local package:
51
-
52
- ```json
53
- "@san-siva/blogkit-md": "file:../blogkit-md"
54
- ```
55
-
56
- Add it to `transpilePackages` in your `next.config.ts`:
57
-
58
- ```ts
59
- const nextConfig = {
60
- transpilePackages: ['@san-siva/blogkit-md'],
61
- };
62
- ```
63
-
64
20
  ### Usage
65
21
 
66
22
  ```tsx
package/dist/index.d.mts CHANGED
@@ -30,4 +30,4 @@ type MarkdownFileResult = {
30
30
  };
31
31
  declare const readMarkdownFile: (filePath: string | undefined) => Promise<MarkdownFileResult>;
32
32
 
33
- export { BlogPost, MarkdownSections, readMarkdownFile };
33
+ export { BlogPost, type Frontmatter, MarkdownSections, readMarkdownFile };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@san-siva/blogkit-md",
3
- "version": "0.2.2",
3
+ "version": "0.2.5",
4
4
  "description": "Converts markdown files into JSX blog posts for Blogkit",
5
5
  "main": "./dist/index.js",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": "./dist/index.js",
9
- "types": "./dist/index.d.ts"
9
+ "types": "./dist/index.d.mts"
10
10
  }
11
11
  },
12
12
  "files": [
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as BlogPost } from './components/BlogPost';
2
2
  export { readMarkdownFile } from './hooks/readMarkdownFile';
3
+ export type { Frontmatter } from './utils/parseMarkdown';
3
4
  export { MarkdownSections } from './utils/renderMarkdown';
File without changes