You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my plan is, the theme of utterances follows archie's dark/light mode.
I tried the way like theme="github-{{mode}}" but failed.
But I can not find a way to do it. Any suggestions would be very appreciated!
The text was updated successfully, but these errors were encountered:
I have been using another theme on my website called hugo-stack. that used a variable to store the value of the theme i.e. light/dark and use that value in theme="github-. the full file looks something like this:
<scriptsrc="https://utteranc.es/client.js"
repo="{{ .Site.Params.comments.utterances.repo }}"
issue-term="{{ .Site.Params.comments.utterances.issueTerm }}"
{{with.Site.Params.comments.utterances.label}}label="{{ . }}"
{{end}}crossorigin="anonymous"
async></script><style>
.utterances {
max-width: unset;
}
</style><script>letutterancesLoaded=false;functionsetUtterancesTheme(theme){letutterances=document.querySelector('.utterances iframe');if(utterances){utterances.contentWindow.postMessage({type: 'set-theme',theme: `github-${theme}`},'https://utteranc.es');}}addEventListener('message',event=>{if(event.origin!=='https://utteranc.es')return;/// Called when Utterances is readyutterancesLoaded=true;setUtterancesTheme(document.documentElement.dataset.scheme)});window.addEventListener('onColorSchemeChange',(e)=>{if(!utterancesLoaded)return;setUtterancesTheme(e.detail)})</script>
hello, I am a total beginer in web dev. I want to add comment system named "Utteranc.es" in archie. But I got some problems.
my plan is, the theme of utterances follows archie's dark/light mode.
I tried the way like
theme="github-{{mode}}"
but failed.But I can not find a way to do it. Any suggestions would be very appreciated!
The text was updated successfully, but these errors were encountered: