{% macro giscus(search_term, lang) %} {% if lang != "en" %} {% set category = "Post Comments (translated)" %} {% set category_id = "DIC_kwDOAlvePc4CPg4c" %} {% set category_path = "post-comments-translated" %} {% else %} {% set category = "Post Comments" %} {% set category_id = "MDE4OkRpc2N1c3Npb25DYXRlZ29yeTMzMDE4OTg1" %} {% set category_path = "post-comments" %} {% endif %} {% if search_term is number %} {% set discussion_url = "https://github.com/phil-opp/blog_os/discussions/" ~ search_term %} {% else %} {% set search_term_encoded = `"` ~ search_term ~ `"` ~ ` in:title` | urlencode %} {% set discussion_url = `https://github.com/phil-opp/blog_os/discussions/categories/` ~ category_path ~ `?discussions_q=` ~ search_term_encoded %} {% endif %}

{{ trans(key="comment_note", lang=lang) | replace(from="_discussion_url_", to=discussion_url) | safe }}

Instead of authenticating the giscus application, you can also comment directly on GitHub.

{% endmacro giscus %}