Currently, the `site.giscus.theme` option is ignored because `giscus.liquid` always computes the theme as light/dark based on the current site theme. This PR allows users to configure separate light and dark giscus themes in `_config.yml`, which will support dynamic updates when switching between light, dark, or system themes. Fixes #3269
26 lines
752 B
Plaintext
26 lines
752 B
Plaintext
<div
|
|
id="giscus_thread"
|
|
{% if page.layout == 'post' %}
|
|
style="max-width: {{ site.max_width }}; margin: 0 auto;"
|
|
{% endif %}
|
|
>
|
|
{% if page.layout == 'post' %}
|
|
<br>
|
|
{% endif %}
|
|
|
|
{% if site.giscus.repo %}
|
|
<script defer src="{{ '/assets/js/giscus-setup.js' | relative_url }}"></script>
|
|
<noscript>
|
|
Please enable JavaScript to view the
|
|
<a href="http://giscus.app/?ref_noscript">comments powered by giscus.</a>
|
|
</noscript>
|
|
{% else %}
|
|
{% capture giscus_warning %}
|
|
> ##### giscus comments misconfigured
|
|
> Please follow instructions at [http://giscus.app](http://giscus.app) and update your giscus configuration.
|
|
{: .block-danger }
|
|
{% endcapture %}
|
|
{{ giscus_warning | markdownify }}
|
|
{% endif %}
|
|
</div>
|