🛑 This repository has been merged into Flowershow monorepo.
Parse and render wiki-style links in markdown especially Obsidian style links.
Using obsidian, when we type in wiki link syntax for eg. [[wiki_link]]
it would parse them as anchors.
- Support
[[Internal link]]
- Support
[[Internal link|With custom text]]
- Support
[[Internal link#heading]]
- Support
[[Internal link#heading|With custom text]]
- Support
![[Document.pdf]]
- Support
![[Image.png]]
- Supported image formats are jpg, jpeg, png, apng, webp, gif, svg, bmp, ico
- Unsupported image formats display a message for eg.
![[Image.xyz]]
would render the following:
Document type XYZ is not yet supported for transclusions
Future support:
- Support
![[Audio.mp3]]
- Support
![[Video.mp4]]
- Support
![[Embed note]]
- Support
![[Embed note#heading]]
npm install remark-wiki-link-plus
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)
-
options.markdownFolder [String]
: A string that points to the content folder.The default
hrefTemplate
is:
(permalink) => `/${permalink}`
npm run test
- Permalinks not linking to case sensitive url paths
- eg. before
[[Page]]
generateshref="/page"
but will now generatehref="/Page"
- eg. before
- Add support for more image formats
- apng, webp, gif, svg, bmp, ico
- Add support for PDF documents
- Add warning for unsupported image formats
- Add support for transclusion links / image links
- png, jpg, jpeg
- permalink for folders with an index file will tranform to folder name only. For example, if the wikilink is [[docs/index]] the href will be '/docs'.
- broken links to filenames that matched the markdown folder name.