Skip to content

How do I create a contributor link for each language? #750

Discussion options

You must be logged in to vote

I solved the problem.

I made the following changes.

  • layouts/partials/main/blog-meta.html
+ {{ $lang_ := .Lang }}
- <p><small>Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }}{{ if eq $index $last }} and {{ else }}, {{ end }}{{ end }}<a class="stretched-link position-relative"     href="{{ "/contributors/" | relURL }}{{ . | urlize }}/">{{ . }}</a>{{ end -}}{{ end -}}&nbsp;&hyphen;&nbsp;<strong>{{ .ReadingTime -}}&nbsp;min read</strong></small><p>
+ <p><small>Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Para…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@h-enk
Comment options

@h-enk
Comment options

@roheclassic
Comment options

Answer selected by roheclassic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants