vite-plugin-permalink
v1.1.4
Published
Add the abbrlink attribute to the markdown file in the specified directory
Downloads
6
Maintainers
Readme
Why? 🤔
When using Vite, I want to listen to the specified directory and automatically add permalink to each markdown article, suitable for static blogs built with vite.
Installation 💿
Install the package as a development dependency:
npm i vite-plugin-permalink
Usage 🚀
Add it to your plugins in vite.config.ts
import { defineConfig } from 'vite'
import permalinkPlugin from 'vite-plugin-permalink'
export default defineConfig({
plugins: [
plugins: [permalinkPlugin(['src/content/**/*.md'])]
],
})
To see which file globbing options are available, check picomatch.
Acknowledgements
This is a nice plugin, I found it right before publishing this one.
License
This library is available as open source under the terms of the MIT License.