Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

How to get remark42 commenting to work with Grav

Started by steve 2 years ago · 2 replies · 491 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 Anna, 5 days ago
1 97 4 days ago
Support · by Anna, 3 weeks ago
1 266 3 weeks ago
Support · by webmasterodp, 1 month ago
4 380 1 month ago
Support · by nwhitfield, 1 month ago
2 351 1 month ago
Support · by stell, 2 months ago
5 657 1 month ago