vite-plugin-permalink
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

vite-plugin-permalink

Add the abbrlink attribute to the markdown file in the specified directory


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

  • hexo-abbrlink

    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.

Dependencies (3)

Dev Dependencies (6)

Package Sidebar

Install

npm i vite-plugin-permalink

Weekly Downloads

1

Version

1.1.4

License

MIT

Unpacked Size

7 kB

Total Files

9

Last publish

Collaborators

  • haikesikejiqiang