@canopycanopycanopy/b-ber-grammar-epigraph 3.0.8-nav-memo.2 → 3.0.8-next.61

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 +15 -4
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,9 +1,20 @@
1
- # `@canopycanopycanopy/b-ber-grammar-epigraph`
1
+ # b-ber-grammar-epigraph
2
2
 
3
- The `b-ber-grammar-epigraph` package renders b-ber's custom `epigraph` Markdown extension (directive) into HTML. More information about b-ber directives can be found in the [All directives](https://github.com/triplecanopy/b-ber/wiki/all-directives) page in the b-ber [Wiki](https://github.com/triplecanopy/b-ber/wiki).
3
+ Handles the `epigraph` inline directive. Supports two forms: an image-based epigraph (`image "file.jpg"` with optional `caption`) that emits a full-width `<section epub:type="epigraph">` containing a figure and image element; and a text-only epigraph (`caption "..." citation "..."`) that emits one or more `<div class="pullquote full-width">` blocks with optional `<cite>` elements inside the epigraph section. Captions and citations support pipe-delimited (`|`) multi-value lists for producing multiple pull-quote blocks from a single directive. Uses `b-ber-parser-figure` as the MarkdownIt plugin.
4
4
 
5
- ## Install
5
+ ## Usage
6
6
 
7
+ Registered as a MarkdownIt plugin by the rendering engine. The exported object provides `plugin`, `name`, and a `renderer` factory:
8
+
9
+ ```js
10
+ import epigraph from '@canopycanopycanopy/b-ber-grammar-epigraph'
11
+ // { plugin, name: 'epigraph', renderer }
7
12
  ```
8
- $ npm i -g @canopycanopycanopy/b-ber-grammar-epigraph
13
+
14
+ ## Dev
15
+
9
16
  ```
17
+ npm test
18
+ ```
19
+
20
+ Tests are in `__tests__/index.test.js`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopycanopycanopy/b-ber-grammar-epigraph",
3
- "version": "3.0.8-nav-memo.2+63b04c68",
3
+ "version": "3.0.8-next.61+2bbec564",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -25,8 +25,8 @@
25
25
  "rimraf": "^2.7.1"
26
26
  },
27
27
  "dependencies": {
28
- "@canopycanopycanopy/b-ber-logger": "3.0.8-nav-memo.2+63b04c68",
29
- "@canopycanopycanopy/b-ber-parser-figure": "3.0.8-nav-memo.2+63b04c68",
28
+ "@canopycanopycanopy/b-ber-logger": "3.0.8-next.61+2bbec564",
29
+ "@canopycanopycanopy/b-ber-parser-figure": "3.0.8-next.61+2bbec564",
30
30
  "lodash": "^4.17.21",
31
31
  "tar": "^6.1.11"
32
32
  },
@@ -47,5 +47,5 @@
47
47
  "url": "https://maxwellsimmer.com"
48
48
  }
49
49
  ],
50
- "gitHead": "63b04c68746dd40114a3718c6bef65710649a688"
50
+ "gitHead": "2bbec5643278f53becb0d2ba1f55edfe379d5587"
51
51
  }