https://github.com/saltbo/vuepress-plugin-disqusjs
🔌 Register a global DisqusJS component to add to your layouts
https://github.com/saltbo/vuepress-plugin-disqusjs
Last synced: about 2 months ago
JSON representation
🔌 Register a global DisqusJS component to add to your layouts
- Host: GitHub
- URL: https://github.com/saltbo/vuepress-plugin-disqusjs
- Owner: saltbo
- Created: 2020-05-19T09:43:13.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-29T01:14:30.000Z (over 1 year ago)
- Last Synced: 2025-04-03T09:38:30.937Z (2 months ago)
- Language: Vue
- Homepage:
- Size: 269 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vuepress Plugin Disqusjs
🔌 Register a global `` component to add to your layouts.This plugins is a vuepress wrapper of [DisqusJS](https://github.com/SukkaW/DisqusJS).
## Installation
```bash
# npm
npm i vuepress-plugin-disqusjs -D# yarn
yarn add vuepress-plugin-disqusjs
```## Register the plugin
```js
plugins: {
'disqusjs': { /* options */ }
},```
Please check out [Config](#config) for options.
Note that Vuepress allows multiple syntaxes to register plugins. See [Vuepress documentation on how to use a plugin](https://vuepress.vuejs.org/plugin/using-a-plugin.html) for more information.
## Use the Disqusjs component
This plugin present a out-of-box SSR-friendly component - ``. Just put it wherever you like, and Disqus will be embedded in the right place. For example:
```html
```
Or you can simply put it in your `.md` file.
```markdown
## Hello VuePressThis is a demo.
```
You can use all the props and events defined by [DisqusJS](https://github.com/SukkaW/DisqusJS).
Prop | Data Type | required | Description
--------------- | ---------- | --------- | -----------
`shortname` | String | true | Your disqus shortname.
`url` | String | false | Your URL where Disqus is present
`title` | String | false | Title that identifies the current page.
`identifier` | String | false | The page's unique identifier
`sso_config` | Object | false | Single sign-on (SSO)
`api_key` | String | false | Your API key disqus
`remote_auth_s3`| String | false | implementation with Laravel/PHP
`language` | String | false | Language overrides## Config
See the table above. All the props are also configuration options for this plugin. They'll be passed to every `Disqusjs` component. You're still able to override it by passing down props. Note that if you don't set language, it'll use VuePress's $lang as default language.
There's still one option available - `name` which specifies the name of the disqus component. Defaults to: `DisqusJS`.