pretty-toc 0.1.1 → 0.1.4

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.
Files changed (2) hide show
  1. package/README.md +14 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -3,13 +3,13 @@ A Table of Contents generation plugin for the Satteri markdown parser library.
3
3
  ## Install
4
4
 
5
5
  ```
6
- npm install pretty-toc
6
+ npm install pretty-toc --save-dev
7
7
  ```
8
8
 
9
9
  ## Example
10
10
 
11
11
  ```javascript
12
- import prettyToc from 'pretty-toc'
12
+ import prettyToc from 'pretty-toc';
13
13
 
14
14
  satteri({
15
15
  hastPlugins: [prettyToc({title: "Table of Contents", listStyle: "decimal"})]
@@ -25,11 +25,20 @@ processor: satteri({
25
25
  directive: true,
26
26
  math: true,
27
27
  },
28
- // mdastPlugins: [mdastPlugin],
29
28
  hastPlugins: [
30
29
  prettyToc({
31
30
  title: "Table of Contents",
32
- listStyle: "decimal", // disc, circle, decimal, none...
31
+ listStyle: "image", // disc, circle, decimal, none... icon, image...
32
+ icon: ["🐶", "🦁", "🐷", "🐸", "🐥", "🐞"], // or just a string, eg. "🐥"
33
+ image: [
34
+ "/svg/unjs--automd.svg",
35
+ "/svg/unjs--hookable.svg",
36
+ "/svg/unjs--knitwork.svg",
37
+ "/svg/unjs--mongoz.svg",
38
+ "/svg/unjs--ofetch.svg",
39
+ "/svg/unjs--uncrypto.svg",
40
+ ], // or just a string, eg. "/svg/unjs--automd.svg"
41
+ markerCssSize: "1rem",
33
42
  lightThemeHighlightColor: "oklch(0.75 0.1229 12.71)",
34
43
  darkThemeHighlightColor: "oklch(0.81 0.1004 305.04)",
35
44
  class: {
@@ -49,7 +58,7 @@ processor: satteri({
49
58
  languageMap: {
50
59
  "de-DE": "Inhaltsverzeichnis",
51
60
  "el-GR": "Περιεχόμενα",
52
- "en-US": "Contents",
61
+ "en-US": "Table of Contents",
53
62
  "es-ES": "Índice",
54
63
  "fr-FR": "Sommaire",
55
64
  "it-IT": "Indice",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pretty-toc",
3
- "version": "0.1.1",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "A Table of Contents generation plugin for the Satteri markdown parser library.",
6
6
  "keywords": [