Giscus theme inconsistency
sechurity opened this issue · comments
Contribution guidelines
- I've read the contribution guidelines and wholeheartedly agree
I've found a bug and checked that ...
- ... the problem doesn't occur with the
mkdocs
orreadthedocs
themes - ... the problem persists when all overrides are removed, i.e.
custom_dir
,extra_javascript
andextra_css
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
The original documentation's template code on integrating Giscus sets the page to a default theme (according to the value of data-theme
of the GIscus code snippet) instead of light theme if the page is first loaded in light mode.
Expected behaviour
When the page is first loaded in light mode (color scheme is not slate
), the comment section powered by Giscus is light theme. Like in the screenshot below.
Actual behaviour
When the page is first loaded in light mode (color scheme is not slate
), the comment section powered by Giscus is the default theme according to the value of data-theme
of the GIscus code snippet .
<script src="https://giscus.app/client.js"
data-repo="[ENTER REPO HERE]"
data-repo-id="[ENTER REPO ID HERE]"
data-category="[ENTER CATEGORY NAME HERE]"
data-category-id="[ENTER CATEGORY ID HERE]"
data-mapping="pathname"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="bottom"
data-theme="transparent_dark"
data-lang="en"
crossorigin="anonymous"
async>
</script>
Steps to reproduce
- Set the page to light mode either by toggling the switch of an existing page or by using system settings
- Visit the page in a new window
Package versions
N/A
Configuration
N/A
System information
Tested on:
- Operating system: Fedora Workstation 36
- Browser: Firefox
Thanks for reporting and providing the details as requested in #4059. Since this is a pure documentation issue, merging the PR closes it.