aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/page.html14
1 files changed, 13 insertions, 1 deletions
diff --git a/templates/page.html b/templates/page.html
index 18a5153..10ea571 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -31,8 +31,16 @@
{%- endblock seo %}
{%- block comments_init %}
- {%- if config.extra.comments.hyvor %}
+ {%- if not config.extra.comment_system or config.extra.comment_system == "hyvor" and config.extra.comments.hyvor %}
<script defer src="https://talk.hyvor.com/embed/embed.js" type="module"></script>
+ {%- elif config.extra.comment_system == "remark42" and config.extra.comments.remark42 %}
+ <script>
+ var remark_config = {
+ host: "{{ config.extra.comments.remark42 | safe }}",
+ site_id: "{{ config.extra.comments.remark42_site_id }}",
+ }
+ </script>
+ <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>
{%- endif %}
{%- endblock comments_init %}
@@ -90,9 +98,13 @@
{%- endblock page_footer %}
{%- block comments_body %}
+ {%- if not config.extra.comment_system or config.extra.comment_system == "hyvor" %}
{%- if config.extra.comments.hyvor %}
<hyvor-talk-comments website-id={{ config.extra.comments.hyvor }} page-id={{ page.slug }}{%- if config.extra.comments.hyvorcolor %} colors="{{ config.extra.comments.hyvorcolor }}"{%- endif %}></hyvor-talk-comments>
{%- endif %}
+ {%- elif config.extra.comment_system == "remark42" and config.extra.comments.remark42 %}
+ <div id="remark42"></div>
+ {%- endif %}
{%- endblock comments_body %}
</article>
{%- block toc %}