Skip to content
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

fix: giscus use current lang as default,and add missing loading params #1062

Closed
wants to merge 4 commits into from

Conversation

xiaoxiyao
Copy link
Contributor

No description provided.

Copy link
Owner

@CaiJimmy CaiJimmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR and sorry for the late reply!

Can you please filter out the unrelated changes? Or create a new PR with only the specified changes.

@@ -1,3 +1,7 @@
{{ $lang := .Language.LanguageCode }}
{{ if not $lang }}
{{ $lang = .Language.Lang }}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://gohugo.io/content-management/multilingual/, .Language.Lang doesn't seem to be a public variable, only .Language.LanguageCode.

Then this change can be simplified as data-lang="{{ default $.Language.LanguageCode .lang }}" I think

Copy link
Contributor Author

@xiaoxiyao xiaoxiyao Oct 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review and feedback. I've created a new pull request (#1075) that only includes the changes about giscus。
Regarding the .Language.Lang variable, you can refer to https://gohugo.io/methods/page/language/

@xiaoxiyao
Copy link
Contributor Author

Move to #1075

@xiaoxiyao xiaoxiyao closed this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants