nizel-plugin-frontmatter-ui 0.1.0 → 0.1.1
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 +47 -1
- package/package.json +29 -9
package/README.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# nizel-plugin-frontmatter-ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Frontmatter-style metadata rendering helpers for [Nizel](https://npmjs.com/package/nizel).
|
|
4
|
+
|
|
5
|
+
This plugin registers a `::frontmatter` custom block and exports `renderFrontmatterMeta()` for apps that want to render document metadata with consistent definition-list markup.
|
|
4
6
|
|
|
5
7
|
The browser build exposes `NizelFrontmatterUi` from `dist/frontmatter-ui.iife.js`.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install nizel-plugin-frontmatter-ui
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { useNizel } from 'nizel';
|
|
19
|
+
import { frontmatterUiPlugin } from 'nizel-plugin-frontmatter-ui';
|
|
20
|
+
|
|
21
|
+
const nizel = useNizel({
|
|
22
|
+
plugins: [frontmatterUiPlugin()],
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Syntax
|
|
27
|
+
|
|
28
|
+
```md
|
|
29
|
+
::frontmatter
|
|
30
|
+
title: Markdown Kitchen Sink
|
|
31
|
+
author: Lezin Renderer Test
|
|
32
|
+
::
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
You can also pass block props when using Nizel custom block syntax.
|
|
36
|
+
|
|
37
|
+
## Options
|
|
38
|
+
|
|
39
|
+
| Option | Type | Default | Description |
|
|
40
|
+
| --- | --- | --- | --- |
|
|
41
|
+
| `className` | `string` | `'frontmatter'` | CSS class for the generated `<dl>`. |
|
|
42
|
+
|
|
43
|
+
## Output
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<dl class="frontmatter"><dt>title</dt><dd>Markdown Kitchen Sink</dd></dl>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,23 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nizel-plugin-frontmatter-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Frontmatter UI helper plugin for Nizel.",
|
|
5
|
-
"repository": {
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/silvandiepen/nizel"
|
|
8
|
+
},
|
|
6
9
|
"type": "module",
|
|
7
10
|
"main": "./dist/index.js",
|
|
8
11
|
"types": "./dist/index.d.ts",
|
|
9
12
|
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./browser": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.js"
|
|
20
|
+
}
|
|
12
21
|
},
|
|
13
|
-
"files": [
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
14
26
|
"scripts": {
|
|
15
27
|
"build": "tsc -p tsconfig.json && npm run build:browser",
|
|
16
28
|
"build:browser": "esbuild src/index.ts --bundle --platform=browser --format=iife --global-name=NizelFrontmatterUi --target=safari14 --outfile=dist/frontmatter-ui.iife.js",
|
|
17
29
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
18
|
-
"test": "npm run build && vitest run test/*.mjs"
|
|
30
|
+
"test": "npm run build && vitest run test/*.mjs",
|
|
31
|
+
"test:run": "vitest run test/*.mjs"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"nizel": "^0.1.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"esbuild": "^0.27.3"
|
|
19
38
|
},
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public",
|
|
41
|
+
"provenance": true
|
|
42
|
+
}
|
|
23
43
|
}
|