Shorten github repo url in md files like...
pnpm i remark-plugin-refined-github
import { read } from 'to-vfile'
import { remarkRefinedGithub } from 'remark-plugin-refined-github'
import { remark } from 'remark'
import remarkGfm from 'remark-gfm'
const file = await remark()
.use(remarkGfm)
.use(remarkRefinedGithub)
.process(await read('test/fixtures/input.md'))
allowList
- current plugin only shorten url listed in allowList
- type
string[]
By default, it equals
'https://github.com',
'https://www.npmjs.com',
'https://raw.githubusercontent.com',
'https://cdn.rawgit.com',
'https://rawgit.com',
'https://togithub.com', // Renovate
'https://github-redirect.dependabot.com', // Dependabot
-
Setup -
pnpm i
-
Build -
pnpm build
built with ❤️ by 😼