Add Giscus Multilingual Support in Hugo PaperMod
Giscus actually supports multiple languages, as you can see in giscus/giscus/locales. However, it doesn’t automatically detect the language, so manual configuration is needed. Hugo PaperMod doesn’t have a simple way to set different comment components for different languages, so we need to configure it manually. Configure Giscus First, create a comment component at giscus.app, which looks like this: <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-strict="0" data-reactions-enabled="1" data-emit-metadata="0" data-input-position="bottom" data-theme="preferred_color_scheme" data-lang="en" crossorigin="anonymous" async ></script> Notice the data-lang attribute - this is what we use to set the language. ...