New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-plugin-disqus

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-disqus

A component for integrating Disqus comments in Gatsby.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
522
decreased by-23.46%
Maintainers
1
Weekly downloads
 
Created
Source

Gatsby Plugin Disqus

npm version

A plugin that simplifies the process of integrating Disqus comments within your Gatsby website.

Install

$ yarn add gatsby-plugin-disqus
or
$ npm install -S gatsby-plugin-disqus

Configure

Add the plugin to your gatsby-config.js file with your Disqus shortname

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-disqus`,
      options: {
        shortname: `your-disqus-shortname`
      }
    },
  ]
}

Usage

The plugin can be used as shown in this brief example:

import Disqus from 'gatsby-plugin-disqus'

const PostTemplate = () => (
  <>
    /* Page Contents */
    <Disqus 
      identifier={post.id}
      title={post.title}
      url={`${config.siteUrl}${location.pathname}`}
    />
  </>
)

export default PostTemplate

While providing an identifier, title, and url are optional, it is recommended as it will ensure that threads won't be lost in the case that the post is renamed or the domain changes.

How to contribute

If you have unanswered questions, would like help with enhancing or debugging the plugin, feel free create an issue or submit a pull request

Keywords

FAQs

Package last updated on 16 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc