markdown2typst 0.1.2 → 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 +12 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  A JavaScript library for converting Markdown to [Typst](https://typst.app/) code.
4
4
 
5
- ## Try it online (PENDING!!!)
6
- See an example use case in this demo website: [https://markdown2typst.vercel.app](https://markdown2typst.vercel.app).
5
+ ## Demo - Try it online
6
+ See as an example use case the [demo](./demo/) of this repository published as a static website: [https://Mapaor.github.io/markdown2typst](https://Mapaor.github.io/markdown2typst).
7
7
 
8
8
  ## Supported Markdown features
9
9
  ### GitHub Flavored Markdown (GFM)
@@ -199,6 +199,16 @@ console.log(typst);
199
199
  </script>
200
200
  ```
201
201
 
202
+ #### Or in a javascript file
203
+ ```js
204
+ import markdown2typst from 'https://cdn.jsdelivr.net/npm/markdown2typst@latest/dist/markdown2typst.min.js';
205
+
206
+ const markdown = '# Hello Typst\n\nThis is a **test**.';
207
+ const typst = markdown2typst(markdown);
208
+ console.log(typst);
209
+ ```
210
+
211
+ Which is what the [demo](./demo/) uses.
202
212
  ## Examples
203
213
 
204
214
  See the [Examples](/examples/README.md) page for basic and advanced examples on how to use the library and all the features it supports.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdown2typst",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "A comprehensive JavaScript library for converting Markdown to Typst code",
5
5
  "type": "module",
6
6
  "main": "./dist/markdown2typst.js",