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
In the current demo, when navigating to related posts, the following tags are displayed:
However, when you switch to /fr and then click a post, for example on this page, no tags are listed:
The reason is that in themes/PaperMod/layouts/_default/single.html, we only allow .Language.Params.Taxonomies.tag as defined in config.yml. I think it would be better to allow dynamic tags for different language pages.
For example, in my current setup, I switched to the following code:
<footerclass="post-footer">
{{- if eq .Lang "en" }}
{{- if .Params.tags }}
<ulclass="post-tags">
{{- range (.GetTerms "tags") }}
<li><ahref="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
{{- end }}
{{- else if eq .Lang "cn" }}
{{- with .Params.cntags }}
<ulclass="post-tags">
{{- range . }}
<li><ahref="/cn/cntags/{{ . | urlize }}">{{ . }}</a></li>
{{- end }}
</ul>
{{- end }}
{{- end }}
{{- if (.Param "ShowPostNavLinks") }}
{{- partial "post_nav_links.html" . }}
{{- end }}
{{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
{{- partial "share_icons.html" . -}}
{{- end }}
</footer>
This code allows me to display tags under both English posts and Chinese posts.
Expected Behavior
Tags should appear under the post for the selected language.
Actual Behavior
Tags are not displayed for posts in non-default languages.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
What you'd like to propose?
In the current demo, when navigating to related posts, the following tags are displayed:
However, when you switch to
/fr
and then click a post, for example on this page, no tags are listed:The reason is that in
themes/PaperMod/layouts/_default/single.html
, we only allow.Language.Params.Taxonomies.tag
as defined inconfig.yml
. I think it would be better to allow dynamic tags for different language pages.For example, in my current setup, I switched to the following code:
This code allows me to display tags under both English posts and Chinese posts.
Expected Behavior
Tags should appear under the post for the selected language.
Actual Behavior
Tags are not displayed for posts in non-default languages.
Code of Conduct
The text was updated successfully, but these errors were encountered: