diff --git a/i18n/en.toml b/i18n/en.toml index 17a1c4c..229104e 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -21,3 +21,21 @@ other = "Search" [search_title] other = "Enter the terms you wish to search for." + +[string_at] +other = "at" + +[string_by] +other = "by" + +[string_follow] +other = "follow" + +[string_in] +other = "in" + +[string_on] +other = "on" + +[string_recent_content] +other = "Recent content" diff --git a/i18n/sv.toml b/i18n/sv.toml index 081a848..d017906 100644 --- a/i18n/sv.toml +++ b/i18n/sv.toml @@ -21,3 +21,21 @@ other = "Sök" [search_title] other = "Ange de villkor du vill söka efter." + +[string_at] +other = "på" + +[string_by] +other = "av" + +[string_follow] +other = "följ" + +[string_in] +other = "i" + +[string_on] +other = "på" + +[string_recent_content] +other = "Senaste innehåll" diff --git a/layouts/_default/list.json.json b/layouts/_default/list.json.json index 664a64e..72df28f 100644 --- a/layouts/_default/list.json.json +++ b/layouts/_default/list.json.json @@ -2,8 +2,8 @@ {{ $length := (len $list) -}} { "version" : "https://jsonfeed.org/version/1", - "title" : "{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}", - "description": "Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}", + "title" : "{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} {{ i18n "string_on" }} {{ end }}{{ .Site.Title }}{{ end }}", + "description": "{{ i18n "string_recent_content" }} {{ if ne .Title .Site.Title }}{{ with .Title }}{{ i18n "string_in" }} {{ . }} {{ end }}{{ end }}{{ i18n "string_on" }} {{ .Site.Title }}", "home_page_url" : "{{ .Site.BaseURL }}", {{ with .OutputFormats.Get "JSON" -}} "feed_url" : "{{ .Permalink }}", diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index e1e24df..c04ee7e 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,20 +1,20 @@ - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} {{ i18n "string_on" }} {{ end }}{{ .Site.Title }}{{ end }} {{ .Permalink }} - Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + {{ i18n "string_recent_content" }} {{ if ne .Title .Site.Title }}{{ with .Title }}{{ i18n "string_in" }} {{ . }} {{ end }}{{ end }}{{ i18n "string_on" }} {{ .Site.Title }} Hugo -- gohugo.io {{ with .Site.LanguageCode -}} - {{.}} + {{ . }} {{ end -}} {{ with .Site.Author.email -}} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} + {{ . }}{{ with $.Site.Author.name }} ({{ . }}){{end}} {{ end -}} {{ with .Site.Author.email -}} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} + {{ . }}{{ with $.Site.Author.name }} ({{ . }}){{end}} {{ end -}} {{ with .Site.Copyright -}} - {{.}} + {{ . }} {{ end -}} {{ if not .Date.IsZero -}} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} @@ -28,7 +28,7 @@ {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email -}} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} + {{ . }}{{ with $.Site.Author.name }} ({{ . }}){{end}} {{ end -}} {{ .Permalink }} {{ .Content | html }} diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 084d828..fbf3da1 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -21,9 +21,9 @@ {{ $width := (mul ($.Scratch.Get "realwidth") (div (add ($.Scratch.Get "height") 0.0) ($.Scratch.Get "realheight"))) -}} {{ $.Scratch.Set "width" (int $width) -}} {{ end -}} -
-{{ with .Get "link" }}{{ end -}} - +
+{{ with .Get "link" }}{{ end -}} + {{- if .Get "link" }}{{ end }} {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
{{ if isset .Params "title" }} @@ -31,7 +31,7 @@ {{ if or (.Get "caption") (.Get "attr") -}}

{{- .Get "caption" -}} -{{ with .Get "attrlink" }} {{ end }}{{ .Get "attr" }}{{ if .Get "attrlink" }}{{ end -}} +{{ with .Get "attrlink" }} {{ end }}{{ .Get "attr" }}{{ if .Get "attrlink" }}{{ end -}}

{{ end -}}