bridgetown-mdjs 1.0.0 → 1.0.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -2
- data/lib/bridgetown-mdjs/builder.rb +1 -1
- data/lib/bridgetown-mdjs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 33d28f3d512888b813bc933ca3c5077e5a0d04a7a4c2a3268dc859ed9bf6802e
|
|
4
|
+
data.tar.gz: b03ef48dc0183a9b74f635799657bf74a16d4c7e1d19b99338d885b790084a43
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96cf42294f391c37bfbe2d37321bbaf44129b164176b7d5954f24695318b702fe24baaa6c30d7d5cfdd14642137a58da572042421de6686a4a450764f082b069
|
|
7
|
+
data.tar.gz: cff481412f456a94d926d1abcc4f11bb407e51f7710fd817be310ad51cccffa31fb958b1087c69aeab3bcc500349678281a0eef43124326c70402dfd69fdc371
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
A [Bridgetown](https://www.bridgetownrb.com) plugin to add Kramdown-based support for [Markdown JavaScript (mdjs)](https://rocket.modern-web.dev/docs/markdown-javascript/overview/).
|
|
4
4
|
|
|
5
|
+
mdjs is a format which allows you to write executable JavaScript from within Markdown files. The mdjs-compatible parser will extract any fenced code block marked as `js script` and later include the extraction(s) within a `<script type="module">` tag at the bottom of the page layout. This means you can import libraries and web components and define various bits of JS inline with your Markdown content.
|
|
5
6
|
|
|
7
|
+
(**Note:** While the mdjs support in Rocket includes stories and HTML component previews, in this initial release for Bridgetown we're only supporting the basic JavaScript code extractions.)
|
|
8
|
+
|
|
9
|
+
_Requires Bridgetown 0.21 or higher._
|
|
6
10
|
|
|
7
11
|
## Installation
|
|
8
12
|
|
|
9
13
|
Run this command to add this plugin to your site's Gemfile:
|
|
10
14
|
|
|
11
15
|
```shell
|
|
12
|
-
$ bundle add
|
|
16
|
+
$ bundle add bridgetown-mdjs -g bridgetown_plugins
|
|
13
17
|
```
|
|
14
18
|
|
|
15
19
|
Then add either a Liquid tag or Ruby helper to your default layout right below the main content.
|
|
@@ -30,7 +34,7 @@ Then add either a Liquid tag or Ruby helper to your default layout right below t
|
|
|
30
34
|
|
|
31
35
|
## Usage
|
|
32
36
|
|
|
33
|
-
The plugin will perform the necessary extractions via the [kramdown-parser-gfm-extractions](https://github.com/bridgetownrb/kramdown-parser-gfm-extractions) add-on to any Markdown file in your Bridgetown site.
|
|
37
|
+
The plugin will perform the necessary extractions (via the [kramdown-parser-gfm-extractions](https://github.com/bridgetownrb/kramdown-parser-gfm-extractions) add-on) to any Markdown file in your Bridgetown site.
|
|
34
38
|
|
|
35
39
|
Here's an example Markdown file where you can see mdjs in action:
|
|
36
40
|
|