diff --git a/README.md b/README.md index a1a5a5b..573f4a3 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ $ git submodule add https://github.com/panr/hugo-theme-hello-friend.git themes/h The theme doesn't require any advanced configuration. Just copy: ``` -baseurl = "https://example.org/" +baseurl = "/" languageCode = "en-us" title = "Hello Friend" theme = "hello-friend" @@ -84,9 +84,15 @@ paginate = 5 identifier = "showcase" name = "Showcase" url = "/showcase" + +[languages] + [languages.en] + writtenBy = "Written by" + readMore = "Read more" + readOtherPosts = "Read other posts" ``` -to `config.toml` file in your Hugo root directory and change params fields. +to `config.toml` file in your Hugo root directory and change params fields. In case you need, here's [a YAML version](https://gist.github.com/panr/8f9b363e358aaa33f6d353c77feee959). ## How to run your site diff --git a/exampleSite/config.toml b/exampleSite/config.toml index f138adb..c1ad606 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,4 +1,4 @@ -baseurl = "https://example.org/" +baseurl = "/" languageCode = "en-us" title = "Hello Friend" theme = "hugo-theme-hello-friend" @@ -26,3 +26,9 @@ paginate = 5 identifier = "showcase" name = "Showcase" url = "/showcase" + +[languages] + [languages.en] + writtenBy = "Written by" + readMore = "Read more" + readOtherPosts = "Read other posts" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b7029fd..4ceeb47 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -8,7 +8,7 @@ {{ .Date.Format "2006-01-02" }} - Written by {{ .Params.Author }} + {{ .Site.Params.WrittenBy }} {{ .Params.Author }} {{ if .Params.tags }} @@ -32,7 +32,7 @@ {{ end }} {{ end }} -
Read more →
+
{{ .Site.Params.ReadMore }} →
{{ end }} {{ partial "pagination.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 47579d9..f3bddd4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -5,7 +5,7 @@ {{ .Date.Format "2006-01-02" }} - Written by {{ .Params.Author }} + {{ .Site.Params.WrittenBy }} {{ .Params.Author }} {{ if .Params.tags }} @@ -26,7 +26,7 @@ {{ if or .NextInSection .PrevInSection }}