Move comment threads for translated posts to separate category

Avoids that a search for the post title returns a thread for a translated post.
This commit is contained in:
Philipp Oppermann
2022-06-07 10:06:09 +02:00
parent 1c9b5edd6a
commit b05c07d21c
5 changed files with 20 additions and 7 deletions

View File

@@ -17,6 +17,6 @@
<hr>
<section>
<h2 id="comments">Comments</h2>
{{ snippets::giscus(search_term=page.title ~ " (Extra Post)") }}
{{ snippets::giscus(search_term=page.title ~ " (Extra Post)", translated=false) }}
</section>
{% endblock after_main %}

View File

@@ -118,7 +118,12 @@
{% else %}
{% set search_term=page.title %}
{% endif %}
{{ snippets::giscus(search_term=search_term) }}
{% if page.lang != "en" %}
{% set translated = true %}
{% else %}
{% set translated = false %}
{% endif %}
{{ snippets::giscus(search_term=search_term, translated=translated) }}
{%- if page.lang != "en" %}
<p class="{% if page.extra.rtl %}right-to-left{% endif %}">