diff --git a/CHANGELOG.md b/CHANGELOG.md index c26b7e9..14cf660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,11 @@ # marqua changelog -## Unreleased +## 0.2.0 - [[`#10`](https://github.com/ignatiusmb/marqua/pull/10)]: add advanced typings for autocompletion - [[`#10`](https://github.com/ignatiusmb/marqua/pull/10)]: export new `forge` helper +- [[`#8`](https://github.com/ignatiusmb/marqua/pull/8)]: (breaking) change `filename` to `breadcrumb` - [[`#8`](https://github.com/ignatiusmb/marqua/pull/8)]: add recursive parsing to `traverse` -- [[`#8`](https://github.com/ignatiusmb/marqua/pull/8)]: change `filename` to `breadcrumb` - [[`#8`](https://github.com/ignatiusmb/marqua/pull/8)]: remove `.sort` when calling `traverse` ## 0.1.2 diff --git a/README.md b/README.md index 995c25b..619489f 100644 --- a/README.md +++ b/README.md @@ -95,11 +95,11 @@ const data = traverse( Marqua is shipped with built-in types, so any code editor that supports it should give autocompletion for the arguments passed. For a more detailed information, take a look at the [source code](src/index.ts) itself or at the [types](src/internal/types.ts) directly. -The first argument of `compile` can either be `string | FileOptions`, and for `traverse` it can be `string | (DirOptions & FileOptions)`. The second argument of both functions is an optional callback (`hydrate`), when not specified or `undefined`, will return an object with `content` and all properties of `frontMatter`. +The first argument of `compile` can either be `string | FileOptions`, and for `traverse` it can be `string | DirOptions`. The second argument of both functions is an optional callback (`hydrate`), when not specified or `undefined`, will return an object with `content` and all properties of `frontMatter`. ```ts interface FileOptions { - pathname: string; + entry: string; /** * minimal = false @@ -123,8 +123,8 @@ interface FileOptions { exclude?: Array; } -interface DirOptions { - dirname: string; +interface DirOptions extends FileOptions { + entry: string; /** * recurse = false @@ -165,10 +165,10 @@ Extending `marker` with plugins is optional, it's already equipped with all the ```js import { marker, compile } from 'marqua'; -import Math from 'markdown-it-texmath'; +import TexMath from 'markdown-it-texmath'; import KaTeX from 'katex'; -marker.use(Math, { +marker.use(TexMath, { engine: KaTeX, delimiters: 'dollars', }); @@ -189,9 +189,9 @@ import { compile } from 'marqua'; * with a caveat of declaring its options * beforehand as const */ -const opts = { entry: 'path/to/file', minimal: false } as const; +const opts = { entry: 'content/reviews/movie/your-name.md', minimal: false } as const; // alternative declaration using forge for autocompletion -// const opts = forge.compile({ entry: 'path/to/file', minimal: false }); +// const opts = forge.compile({ entry: 'content/reviews/movie/your-name.md', minimal: false }); compile(opts); @@ -200,7 +200,7 @@ compile(opts); */ import { forge } from 'marqua'; compile( - { entry: 'path/to/file', minimal: false }, + { entry: 'content/reviews/movie/your-name.md', minimal: false }, ({ frontMatter, content, breadcrumb }) => { // do stuff with frontMatter / content // parse breadcrumb or some other stuff diff --git a/package-lock.json b/package-lock.json index a436bb8..0e8737a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "marqua", - "version": "0.1.2", + "version": "0.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.1.2", + "version": "0.2.0", "license": "MIT", "dependencies": { "@ignatiusmb/aqua": "^20.3.3", diff --git a/package.json b/package.json index 81d42e1..d6aa0e4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "marqua", "author": "Ignatius Bagus", "description": "Augmented Markdown Compiler", - "version": "0.1.2", + "version": "0.2.0", "license": "MIT", "type": "module", "main": "index.js",