1.0.0 • Published 2 years ago
@tuancao/remark-wiki-link v1.0.0
remark-wiki-link-plus
Parse and render wiki-style links in markdown especially Obsidian style links.
What is this ?
Using obsidian, when we type in wiki link syntax for eg. [[wiki_link]]
it would parse them as anchors.
Features supported
- Support
[[Internal link]]
- Support
[[Internal link|With custom text]]
- Support
[[Internal link#heading]]
- Support
[[Internal link#heading|With custom text]]
Future support:
- Support
![[Embed note]]
- Support
![[Embed note#heading]]
Installation
npm install remark-wiki-link-plus
Usage
const unified = require('unified')
const markdown = require('remark-parse')
const wikiLinkPlugin = require('remark-wiki-link-plus');
let processor = unified()
.use(markdown, { gfm: true })
.use(wikiLinkPlugin)
Configuration options
options.markdownFolder [String]
: A string that points to the content folder.The default
hrefTemplate
is:
(permalink) => `/${permalink}`
Running the tests
npm run test
1.0.0
2 years ago