
Research
wget to Wipeout: Malicious Go Modules Fetch Destructive Payload
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
gatsby-plugin-disqus
Advanced tools
A plugin that simplifies adding Disqus comments to your Gatsby website
The goal of this plugin is to allow users to bring their content to life and cultivate engaged communities by integrating Disqus comments into their blazing-fast Gatsby websites. After struggling to integrate different Disqus components into my Gatsby site, creating an easily-configured plugin for the Gatsby ecosystem felt like a no-brainer.
$ yarn add gatsby-plugin-disqus
or
$ npm install -S gatsby-plugin-disqus
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`
}
},
]
}
You can use the plugin as shown in this brief example:
import { Disqus, CommentCount } from 'gatsby-plugin-disqus'
const PostTemplate = () => {
let disqusConfig = {
url: `${config.siteUrl+location.pathname}`,
identifier: post.id,
title: post.title,
}
return (
<>
<h1>{post.title}</h1>
<CommentCount config={disqusConfig} placeholder={'...'} />
/* Post Contents */
<Disqus config={disqusConfig} />
</>
)
}
export default PostTemplate
While providing a url
, identifier
, and title
are optional, these attributes are recommended as it will prevent threads from being lost in the case that the domain changes or the post is renamed.
Additional information on all available parameters can be found on the wiki.
Note: When running your site locally, you should pass the production URL to the config.url
because this is the URL that Disqus will associate with the shortname
and identifier
to identify the correct comment thread.
yarn
installed.mkdir gatsby-disqus-workspace
cd
into gatsby-disqus-workspace/gatsby-plugin-disqus/
and run yarn && yarn watch
. Leave this terminal window open.gatsby-plugin-disqus
into your workspace folder for testing purposes.package.json
and add the following:{
"private": true,
"workspaces": [
"your-example-test-site",
"gatsby-plugin-disqus/lib"
]
}
yarn && yarn workspace <example-site> run develop
.If you have unanswered questions or would like help with enhancing or debugging the plugin, feel free create an issue or submit a pull request.
FAQs
A component for integrating Disqus comments in Gatsby.
The npm package gatsby-plugin-disqus receives a total of 444 weekly downloads. As such, gatsby-plugin-disqus popularity was classified as not popular.
We found that gatsby-plugin-disqus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.