feat(giscus): expose language option for Comments component (#2012)

* add language support for Comment

* docs: let users know they can customize their language preference
This commit is contained in:
Jiangnan Li
2025-06-08 17:23:01 +08:00
committed by GitHub
parent 9de370ae14
commit cdd0be2aa8
3 changed files with 10 additions and 1 deletions

View File

@ -17,6 +17,7 @@ type Options = {
strict?: boolean
reactionsEnabled?: boolean
inputPosition?: "top" | "bottom"
lang?: string
}
}
@ -50,6 +51,7 @@ export default ((opts: Options) => {
data-theme-url={
opts.options.themeUrl ?? `https://${cfg.baseUrl ?? "example.com"}/static/giscus`
}
data-lang={opts.options.lang ?? "en"}
></div>
)
}