Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

How to get remark42 commenting to work with Grav

Started by steve 2 years ago · 2 replies · 83 views
2 years ago

I have built remark42 commenting system. And am now trying to link it into the pages. code used is:

HTML
<script>  var remark_config = {    host: 'REMARK_URL',    site_id: 'YOUR_SITE_ID',  }</script>
HTML
<script>!function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);</script>

~I have added these to a js file that is loading. The issue is where to add.

HTML
<div id="remark42"></div>

so I can call the commenting system into grav. Any ideas on how to achieve the last part?

2 years ago

Hi @Da_bfg , can you send some html output example of you what you to achieve?

2 years ago

@Da_bfg

Assuming you're using the default Quark theme, have you tried adding that div tag in the templates/partials/blog-item.html.twig ?

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 50 6 hours ago
Support · by Anna, 2 days ago
2 58 9 hours ago
Support · by Justin Young, 10 hours ago
1 28 10 hours ago
Support · by Duc , 1 week ago
2 63 5 days ago
Support · by Colin Hume, 1 week ago
2 53 5 days ago