Skip to content

Commit

Permalink
fix(giscus): add missing attributes and allow local theme
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Dec 20, 2024
1 parent b1b667e commit 92a2e6b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,13 @@ footer-hover-col: "#0085A1"
# category: Announcements # Category name of your GitHub Discussion posts
# category-id: # ID of your category, retrieve this info from https://giscus.app
# mapping: pathname
# strict: 0
# reactions-enabled: 1
# emit-metadata: 0
# theme: light
# input-position: bottom
# theme: light # custom themes supported such as a url (https://example.com/path/to/theme.css) or local path (/assets/css/giscus.css)
# lang: en
# lazy-loading: true

################
# --- Misc --- #
Expand Down
12 changes: 11 additions & 1 deletion _includes/giscus-comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@
data-category="{{ site.giscus.category }}"
data-category-id="{{ site.giscus.category-id }}"
data-mapping="{{ site.giscus.mapping }}"
data-strict="{{ site.giscus.strict }}"
data-reactions-enabled="{{ site.giscus.reactions-enabled }}"
data-emit-metadata="{{ site.giscus.emit-metadata }}"
data-theme="{{ site.giscus.theme }}"
data-input-position="{{ site.giscus.input-position }}"
{% assign theme = site.giscus.theme %}
{% if theme | slice: 0 == '/' %}
{% assign theme = theme | absolute_url %}
{% endif %}
data-theme="{{ theme }}"
data-lang="{{ site.giscus.lang }}"
{% if site.giscus.lazy-loading == true %}
data-loading="lazy"
{% endif %}
crossorigin="anonymous"
async>
</script>
Expand Down

0 comments on commit 92a2e6b

Please sign in to comment.