0.0.2 • Published 2 years ago

remark-plugin-refined-github v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

remark-plugin-refined-github

npm GitHub

Shorten github repo url in md files like...

refined-github

install

pnpm i remark-plugin-refined-github

usage

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'))

options

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

development

  • Setup - pnpm i
  • Build - pnpm build

built with ❤️ by 😼