Change theme config

This commit is contained in:
panr 2019-01-25 18:30:02 +01:00
parent 5cfc6e4f29
commit 72e85173cf
2 changed files with 23 additions and 22 deletions

View File

@ -58,40 +58,41 @@ The theme doesn't require any advanced configuration. Just copy:
``` ```
baseurl = "/" baseurl = "/"
languageCode = "en-us" languageCode = "en-us"
title = "Hello Friend"
theme = "hello-friend" theme = "hello-friend"
copyright = ""
paginate = 5 paginate = 5
[params] [params]
subtitle = "A simple theme for Hugo" # dir name of your blog content (default is `content/posts`)
# dir name for your list content
contentTypeName = "posts" contentTypeName = "posts"
# "light" or "dark" # "light" or "dark"
defaultTheme = "dark" defaultTheme = "dark"
[params.logo] [languages]
[languages.en]
title = "Hello Friend"
subtitle = "A simple theme for Hugo"
copyright = ""
writtenBy = "Written by"
readMore = "Read more"
readOtherPosts = "Read other posts"
[languages.en.params.logo]
logoText = "hello friend" logoText = "hello friend"
logoHomeLink = "/"
# or # or
# #
# path = "/img/your-example-logo.svg" # path = "/img/your-example-logo.svg"
# alt = "Your example logo alt text" # alt = "Your example logo alt text"
[menu] [languages.en.menu]
[[menu.main]] [[languages.en.menu.main]]
identifier = "about" identifier = "about"
name = "About" name = "About"
url = "/about" url = "/about"
[[menu.main]] [[languages.en.menu.main]]
identifier = "showcase" identifier = "showcase"
name = "Showcase" name = "Showcase"
url = "/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. In case you need, here's [a YAML version](https://gist.github.com/panr/8f9b363e358aaa33f6d353c77feee959). 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).

View File

@ -1,4 +1,4 @@
<a href="{{ .Site.BaseURL }}" style="text-decoration: none;"> <a href="{{ if .Site.Params.Logo.LogoHomeLink }}{{ .Site.Params.Logo.LogoHomeLink }}{{else}}{{ .Site.BaseURL }}{{ end }}" style="text-decoration: none;">
<div class="logo"> <div class="logo">
{{ if .Site.Params.Logo.path }} {{ if .Site.Params.Logo.path }}
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" /> <img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />