Skip to content

Parse [[internal link]] into normal markdown links to let them be supported in vuepress, which is useful for Wiki writers and researchers.

License

Notifications You must be signed in to change notification settings

RoderickQiu/vuepress-plugin-internal-link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vuepress-plugin-internal-link

When setting up wikis or taking notes, [[internal links]] are useful. However, vuepress itself doens't have a convient way of having internal links. And that's what this plugin is for.

Install and Use

1. Installation

Simply use yarn to fetch this package for you. NPM is also OK.

yarn add vuepress-plugin-internal-link

2. Configuration

It's extremely easy to use this plugin.

Find your .vuepress/config.js, and just write down:

plugins: {
    'internal-link': {}
}

Then the whole world is your oyster.

Use with custom parsing pattern

The default pattern can only parse English and Chinese, so in some cases you may need to use another pattern.

Find your .vuepress/config.js, and write down:

plugins: {
    'internal-link': {
        linkPattern: /YOUR_PATTERN/
    }
}

The pattern should be a valid regex.

3. Usage

To use internal link, you need to write stuff like [[link]] and [[another link]], which will resulted in an internal link to ./link.md or ./link.html after building.

This internal link feature can be used to export articles from platforms like Obsidian.

Also, for VSCode users, don't hesitate to try Markdown Notes.

Acknowledgements