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

Add option to add word count to metadata. Closes #735 #740

Merged
merged 1 commit into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions i18n/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
one: "1 min"
other: "{{ .Count }} min"

- id: words
translation:
one : "Wort"
other: "{{ .Count }} Wörter"

- id: toc
translation: "Inhaltsverzeichnis"

Expand Down
5 changes: 5 additions & 0 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
one : "1 min"
other: "{{ .Count }} min"

- id: words
translation:
one : "word"
other: "{{ .Count }} words"

- id: toc
translation: "Table of Contents"

Expand Down
7 changes: 6 additions & 1 deletion i18n/es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
one : "1 min"
other: "{{ .Count }} min"

- id: words
translation:
one : "palabra"
other: "{{ .Count }} palabras"

- id: toc
translation: "Tabla de Contenidos"

Expand All @@ -22,4 +27,4 @@
translation: "copiar"

- id: code_copied
translation: "¡copiado!"
translation: "¡copiado!"
5 changes: 5 additions & 0 deletions i18n/fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
one : "1 min"
other: "{{ .Count }} min"

- id: words
translation:
one : "mot"
other: "{{ .Count }} mots"

- id: toc
translation: "Table des Matières"

Expand Down
5 changes: 5 additions & 0 deletions i18n/it.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
one: "1 minuto"
other: "{{ .Count }} minuti"

- id: words
translation:
one : "parola"
other: "{{ .Count }} parole"

- id: toc
translation: "Tabella dei Contenuti"

Expand Down
5 changes: 5 additions & 0 deletions i18n/nl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
one: "1 min"
other: "{{ .Count }} min"

- id: words
translation:
one : "woord"
other: "{{ .Count }} woorden"

- id: toc
translation: "Inhoudsopgave"

Expand Down
5 changes: 5 additions & 0 deletions i18n/pt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
one: "1 minuto"
other: "{{ .Count }} minutos"

- id: words
translation:
one : "palavra"
other: "{{ .Count }} palavras"

- id: toc
translation: "Conteúdo"

Expand Down
4 changes: 4 additions & 0 deletions layouts/partials/post_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
{{- end }}

{{- if (.Param "ShowWordCount") -}}
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
{{- end }}

{{- with (partial "author.html" .) }}
{{- $scratch.Add "meta" (slice .) }}
{{- end }}
Expand Down