![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
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 0 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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.