GithubHelp home page GithubHelp logo

rustem81 / vue-disqus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ktquez/vue-disqus

0.0 2.0 0.0 108 KB

Vue component to integrate Disqus comments in your application, with support for SPA

Home Page: https://vue-disqus.surge.sh/

License: MIT License

HTML 53.37% JavaScript 16.29% Vue 30.34%

vue-disqus's Introduction

vue-disqus

Vue component to integrate Disqus comments in your application Vue.js, with support for SPA and Vue 2.*

Installation

Install package via NPM
$ npm install vue-disqus

Include via CDN

<script src="https://cdn.jsdelivr.net/npm/vue-disqus@3/dist/vue-disqus.js"></script>

Install in your vue app

import Vue from 'vue'
import VueDisqus from 'vue-disqus'

Vue.use(VueDisqus)
...

Using in Vue file components

<template>
  <div class="comments">
    <vue-disqus shortname="your_shortname_disqus" :identifier="page_id" url="http://example.com/path"></vue-disqus>
  </div>
</template>
// ...

Install in Nuxt

Create plugin file plugins/disqus.js

import Vue from 'vue'
import VueDisqus from 'vue-disqus'

Vue.use(VueDisqus)

In config file nuxt.config.js

...
plugins: [
  '~/plugins/disqus'
]

Using in Vue file components

<template>
  <div class="comments">
    <vue-disqus shortname="your_shortname_disqus" :identifier="page_id" url="http://example.com/path"></vue-disqus>
  </div>
</template>
// ...

Using with HTML files

Add the component to the base instance Vue
<!-- Required Javascript -->
<script src="https://vuejs-cdn-link"></script>
<script src="https://unpkg.com/vue-disqus"></script>
<!-- Assuming your view app is APP. -->
<div id="app">
  <div class="comments">
    <vue-disqus shortname="your_shortname_disqus"></vue-disqus>
  </div>
</div>

Props

Prop Data Type required Description
shortname String true Your shortname disqus.
title String false Title to identify current page.
identifier String false Your 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

Important

Don't use hash (myurl.com/#/) in urls, if you are using the vue-router always opt for HTML5 history: mode.

Events

Event name Description
ready When Disqus is ready. This can be used to show a placeholder or loading indicator.

See Event Handling.

License

MIT

Contributing

  • Check the open issues or open a new issue to start a discussion around your feature idea or the bug you found.
  • Fork repository, make changes, add your name and link in the authors session CONTRIBUTING.md
  • Send a pull request

If you want a faster communication, find me on @ktquez

Thank you

vue-disqus's People

Contributors

ktquez avatar rjyo avatar smoothlikejazz avatar myst729 avatar adam-lynch avatar blackglory avatar fayland avatar lukasdrgon avatar weotch avatar huilang-me avatar

Watchers

James Cloos avatar Rustem  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.