0.1.0 • Published 2 years ago

vuepress-plugin-edit-page-link v0.1.0

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

vuepress-plugin-edit-page-link

Version Downloads

VuePress v2 plugin for getting edit page in repository link. In order to use this plugin, your project must be a git repository with a remote "origin" added.

Installation

npm install --save vuepress-plugin-edit-page-link

Usage

Add plugin to your VuePress config:

import { editPageLinkPlugin } from 'vuepress-plugin-edit-page-link'

export default {
  plugins: [editPageLinkPlugin()],
}

And use it in your Vue components:

<script setup>
import { useEditPageLink } from 'vuepress-plugin-edit-page-link/client'

const editPageLink = useEditPageLink()
<script>

<template>
  <a
    :href="editPageLink"
    target="_blank"
    rel="noreferrer"
  >
    Edit page on GitHub
  </a>
</template>

Contribution

See Contribution guide.