File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
quartz/components/scripts Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ afterBody: [
4545 category: ' Announcements' ,
4646 // from data-category-id
4747 categoryId: ' DIC_kwDOFxRnmM4B-Xg6' ,
48+ // from data-lang
49+ lang: ' en'
4850 }
4951 }),
5052],
@@ -90,6 +92,10 @@ type Options = {
9092 // where to put the comment input box relative to the comments
9193 // defaults to 'bottom'
9294 inputPosition? : " top" | " bottom"
95+
96+ // set your preference language here
97+ // defaults to 'en'
98+ lang? : string
9399 }
94100}
95101` ` `
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ type GiscusElement = Omit<HTMLElement, "dataset"> & {
5555 strict : string
5656 reactionsEnabled : string
5757 inputPosition : "top" | "bottom"
58+ lang : string
5859 }
5960}
6061
@@ -78,7 +79,7 @@ document.addEventListener("nav", () => {
7879 giscusScript . setAttribute ( "data-strict" , giscusContainer . dataset . strict )
7980 giscusScript . setAttribute ( "data-reactions-enabled" , giscusContainer . dataset . reactionsEnabled )
8081 giscusScript . setAttribute ( "data-input-position" , giscusContainer . dataset . inputPosition )
81-
82+ giscusScript . setAttribute ( "data-lang" , giscusContainer . dataset . lang )
8283 const theme = document . documentElement . getAttribute ( "saved-theme" )
8384 if ( theme ) {
8485 giscusScript . setAttribute ( "data-theme" , getThemeUrl ( getThemeName ( theme ) ) )
You can’t perform that action at this time.
0 commit comments