https://github.com/up9cloud/docsify-vssue
https://github.com/up9cloud/docsify-vssue
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/up9cloud/docsify-vssue
- Owner: up9cloud
- License: mit
- Created: 2019-02-22T21:07:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-28T22:19:47.000Z (about 5 years ago)
- Last Synced: 2025-08-09T04:46:13.646Z (10 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docsify-vssue
## Usage
- Follow this [guide](https://vssue.js.org/guide/github.html#create-a-new-oauth-app) to setup
- Add script to your docsify site's `index.html`
```html
let routerMode
if (location.hostname === 'localhost') {
routerMode = 'hash'
} else {
routerMode = 'history' // or 'hash', up to you
}
window.$docsify = {
routerMode,
vssue: {
// see https://vssue.js.org/options/#component-props
title: options => {
let title = `${options.prefix}${location.origin}` // share one issue for localhost
if (location.hostname !== 'localhost') {
title += location.pathname
if (routerMode !== 'hash') {
title += location.hash
}
}
return title
},
options: {
prefix: '',
labels: ['commenting-system'],
owner: 'up9cloud', // your github account
repo: '-o-', // your public repo name
clientId: 'daafa315ac375fc04445', // github oauth client id
clientSecret: 'dcc3bd1c99de59abe3258ad5a5f084b045cecd6e', // github oauth client secret
}
}
}
```