Change theme config

This commit is contained in:
panr 2019-01-25 18:30:02 +01:00
parent e25cfe7977
commit 91d762f17c
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 = "/"
languageCode = "en-us"
title = "Hello Friend"
theme = "hello-friend"
copyright = ""
paginate = 5
[params]
subtitle = "A simple theme for Hugo"
# dir name for your list content
# dir name of your blog content (default is `content/posts`)
contentTypeName = "posts"
# "light" or "dark"
defaultTheme = "dark"
[params.logo]
logoText = "hello friend"
# or
#
# path = "/img/your-example-logo.svg"
# alt = "Your example logo alt text"
[menu]
[[menu.main]]
identifier = "about"
name = "About"
url = "/about"
[[menu.main]]
identifier = "showcase"
name = "Showcase"
url = "/showcase"
[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"
logoHomeLink = "/"
# or
#
# path = "/img/your-example-logo.svg"
# alt = "Your example logo alt text"
[languages.en.menu]
[[languages.en.menu.main]]
identifier = "about"
name = "About"
url = "/about"
[[languages.en.menu.main]]
identifier = "showcase"
name = "Showcase"
url = "/showcase"
```
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">
{{ if .Site.Params.Logo.path }}
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />