Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(giscus): add missing attributes and allow local theme #1407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading