Skip to content

Latest commit

 

History

History
96 lines (71 loc) · 3.92 KB

plugins.md

File metadata and controls

96 lines (71 loc) · 3.92 KB

The following example demonstrates how to install remark-frontmatter 🌎, a syntax plug-in from the remark 🌎 plug-in ecosystem 🌎 which makes glossarify-md (resp. its internal remark parser) handle non-standard Frontmatter syntax, correctly (See Markdown Syntax Extensions for when you need a plug-in).

ⓘ Note: glossarify-md does not guarantee compatibility with plug-ins and likely won't help with issues arising due to installing and using additional third-party plug-ins.

We'll assume the following project structure:

${root}
   +- docs/                        (baseDir)
   +- docs-glossarified/           (outDir)
   +- node_modules/
   |- glossarify-md.conf.json
   |- package.json
   '- .gitignore

1: Install remark-frontmatter 🌎:

npm install remark-frontmatter

2: In your glossarify-md.conf.json add:

{
  "unified": {
    "plugins": {
      "remark-frontmatter": {
        "type": "yaml",
        "marker": "-"
      }
    }
  }
}

Keys of the plugins object tell what plug-in to load and may be:

Their value in turn are options passed to the plug-in. Read remark-frontmatter 🌎 docs, to find out about available options.

ⓘ The unified key embeds a unified configuration object. Its schema is not subject to glossarify-md's own config schema, anymore. Thus, if you would like to have the configs separated a bit more clearly, then you can split them:

3: Create a file unified.conf.json next to glossarify-md.conf.json

4: Copy the value of unified to unified.conf.json:

{
  "plugins": {
    "remark-frontmatter": {
      "type": "yaml",
      "marker": "-"
    }
  }
}

5: In glossarify-md.conf.json replace plugins with rcPath (rooted in outDir, so you need to step out):

{
  "unified": {
    "rcPath": "../unified.conf.json"
  }
}

If you would like to learn more about how unified 🌎 and remark 🌎 relate to glossarify-md, read Conceptual Layers