Closed sawilde closed 2 years ago
extend data passed to comments to allow easier extension for other comment systems eg
to use the cusdis comments system via gatsby-plugin-cusdis your would
gatsby-plugin-cusdis
and then update gatsby-config.js with
gatsby-config.js
{ resolve: `gatsby-plugin-cusdis`, options: { appId: `your-cusdis-id`, host: `your-cusdis-host`, // not required, default https://cusdis.com }, },
and then add a shadow copy of Comments.js with
Comments.js
import React from 'react' import PropTypes from 'prop-types' import Cusdis from 'gatsby-plugin-cusdis' const Comments = ({ id, title, url }) => { const attrs = { pageId: id.substr(13), pageUrl: url, pageTitle: title, theme: `auto`, } return ( <Cusdis attrs={attrs} /> ) } Comments.propTypes = { id: PropTypes.string, title: PropTypes.string, url: PropTypes.string, } export default Comments
thanks
extend data passed to comments to allow easier extension for other comment systems eg
to use the cusdis comments system via
gatsby-plugin-cusdis
your wouldand then update
gatsby-config.js
withand then add a shadow copy of
Comments.js
with