-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Native support for Giscus comments #613
Comments
For others who want to change the theme of your custom comments' engine, the theme will emit a custom event called import { getPreferMode } from 'js/mode/functions';
document.addEventListener('hbs:mode', (e: CustomEvent) => {
changeTheme(e.detail.mode === 'auto' ? getPreferMode() : e.detail.mode);
});
function changeTheme() {
// do some stuff.
} See also https://hbs.razonyang.com/v1/en/docs/advanced/events/ |
Implemented via #615. https://hbs.razonyang.com/v1/en/docs/widgets/comments/#giscus |
Awesome! Thank you! |
@yshalsager FYI, I saw that you've added the Arabic language to Giscus, you'll need to upgrade the theme to the latest commit to make it work. Since the theme maintaining it own languages list for avoiding getting errors of Giscus giscus/giscus#620 on the case of unsupported languages.
|
Thanks for letting me know, will do now :) |
Is your feature request related to a problem? Please describe.
The theme provide support for Utterances comments and any custom widget, but custom widgets aren't well integrated with the theme. E.g. Toggling light/dark mode won't affect the custom comment widget.
I am using https://github.com/giscus as an alternative of Utterances comments, it does exactly the same thing but depends on GitHub Discussions instead of issues which I find more appealing to me.
As you can see here, in dark theme the widget is still using the white theme as set in custom.html partial.
Describe the solution you'd like
I would like to suggest adding https://github.com/giscus as a native option for comments, and integrate it with the theme the same way Utterances is supported.
Describe alternatives you've considered
Only setting up my own custom widget.
The text was updated successfully, but these errors were encountered: