Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cwray-tech/gatsby-source-comments
A Gatsby plugin that makes it easy to add comments to your Gatsby website.
https://github.com/cwray-tech/gatsby-source-comments
comment-system gatsby gatsby-plugin javascript
Last synced: about 2 months ago
JSON representation
A Gatsby plugin that makes it easy to add comments to your Gatsby website.
- Host: GitHub
- URL: https://github.com/cwray-tech/gatsby-source-comments
- Owner: cwray-tech
- License: 0bsd
- Created: 2020-12-01T14:54:15.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-02T00:10:01.000Z (about 4 years ago)
- Last Synced: 2024-11-09T13:46:44.365Z (3 months ago)
- Topics: comment-system, gatsby, gatsby-plugin, javascript
- Language: JavaScript
- Homepage: https://github.com/cwray-tech/gatsby-source-comments
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A comment plugin for Gatsby
This is a plugin for Gatsby that makes it easy to add comments to posts in your Gatsby site.
## How it works
- Comments are stored in a free Heroku API.
- Comments are then returned during build time and the Gatsby compiler will create static json files in your website.
- Comments are displayed on your site from the static json files.
- Users can post comments to the API as well with a comment form.## Configuration
1. To configure the plugin, you need to download it into your server.
2. It should be in a folder one above your Gatsby project folder, or if you prefer, you can set it up as a local plugin.3. CD into your site directory, and use the npm link command to link the plugin to your Gatsby node modules.
```bash
# First cd to the package folder.
cd gatsby-source-comments# Then run the npm or yarn link command.
npm link# Go to your Gatsby website directory.
cd your-website# Finally, run the npm or yarn link command to connect the local plugin folder to your website.
npm link "gatsby-source-comments"
```4. Then add the plugin configuration to your gatsby.config.js file.
```javascript
module.exports = {
// Other configurations
plugins: [
// Other plugins
"gatsby-plugin-dom-injector",
{
resolve: "gatsby-comment-server-plugin",
options: { website: "https://your-website-url.com" },
// Above you can see that your website is a option you must provide.
},
],
};
```