This package has been deprecated

Author message:

WARNING: This package has been renamed. Install disqus-snippet instead; see https://github.com/pirxpilot/disqus-snippet

code42day-disqus

1.3.0 • Public • Published

NPM version Dependency Status

disqus

Load disqus threads

See in the wild on the American Scenic Byways website - source.

Installation

Install with npm(1):

$ npm install --save code42day-disqus

API

Add #disqus_thread element where you want the thread of discus comments to be rendered.

The following configuration variables are supported:

  • shortname - your disqus forum id - the only mandatory parameter
  • identifier - identifier if different than URL, recommended
  • title - page title if different from head.title
  • url - cannonical page URL, recomended if page URL can have query params
  • developer - set to 1 when loading from localhost

You can pass disqus paramaters using dataset attributes or options object.

On the page:

  <div id="disqus_thread" data-shortname="foo" data-title="Thrursday Foo Discussion"></div>

In the script:

  var disqus = require(`disqus`);
  disqus({
    title: 'Some other title',
    developer: 1
  });

Parameters passed to disqus function overwrite those set up using data- attributes.

If no #disqus_thread element is found we die silently.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i code42day-disqus

Weekly Downloads

1

Version

1.3.0

License

MIT

Last publish

Collaborators

  • deprecated.packages