mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-24 22:10:39 +00:00
improve defaults and getting started guide
This commit is contained in:
parent
b2f715a50c
commit
4e59fbe941
@ -78,9 +78,7 @@ To prepare your new site environment just a few steps are required:
|
||||
# Geekblog required configuration
|
||||
pygmentsUseClasses = true
|
||||
pygmentsCodeFences = true
|
||||
|
||||
disablePathToLower = true
|
||||
enableGitInfo=true
|
||||
|
||||
# Needed for mermaid shortcodes
|
||||
[markup]
|
||||
@ -91,8 +89,9 @@ To prepare your new site environment just a few steps are required:
|
||||
endLevel = 9
|
||||
|
||||
[taxonomies]
|
||||
author = authors
|
||||
tag = tags
|
||||
author = "authors"
|
||||
tag = "tags"
|
||||
series = "series"
|
||||
|
||||
[mediaTypes]
|
||||
[mediaTypes."application/atom+xml"]
|
||||
@ -122,7 +121,13 @@ To prepare your new site environment just a few steps are required:
|
||||
5. Test your site.
|
||||
|
||||
```Shell
|
||||
hugo server --theme geekblog -D
|
||||
hugo server -D
|
||||
```
|
||||
|
||||
If you want to add some demo data you could use the content from [hugoBasicExample](https://github.com/gohugoio/hugoBasicExample):
|
||||
|
||||
```Shell
|
||||
curl -L https://github.com/gohugoio/hugoBasicExample/archive/master.tar.gz | tar -xz --exclude "config*" --exclude "LICENSE" --exclude "README*" --strip-components=1
|
||||
```
|
||||
|
||||
### Option 1: Download pre-build release bundle
|
||||
@ -130,6 +135,7 @@ To prepare your new site environment just a few steps are required:
|
||||
Download and extract the latest release bundle into the theme directory.
|
||||
|
||||
```Shell
|
||||
mkdir -p themes/hugo-geekblog/
|
||||
curl -L https://github.com/xoxys/hugo-geekblog/releases/latest/download/hugo-geekblog.tar.gz | tar -xz -C themes/hugo-geekblog/ --strip-components=1
|
||||
```
|
||||
|
||||
@ -162,15 +168,13 @@ gulp default
|
||||
{{< tab "TOML" >}}
|
||||
|
||||
```Toml
|
||||
# ...
|
||||
|
||||
baseURL = "http://localhost"
|
||||
title = "Geekblog"
|
||||
theme = "hugo-geekblog"
|
||||
|
||||
# Required to get well formatted code blocks
|
||||
pygmentsUseClasses = true
|
||||
pygmentsCodeFences = true
|
||||
enableGitInfo = true
|
||||
|
||||
disablePathToLower = true
|
||||
enableGitInfo = true
|
||||
|
||||
@ -182,8 +186,9 @@ enableGitInfo = true
|
||||
endLevel = 9
|
||||
|
||||
[taxonomies]
|
||||
author = authors
|
||||
tag = tags
|
||||
author = "authors"
|
||||
tag = "tags"
|
||||
series = "series"
|
||||
|
||||
[mediaTypes]
|
||||
[mediaTypes."application/atom+xml"]
|
||||
@ -210,14 +215,14 @@ enableGitInfo = true
|
||||
term = ["HTML", "ATOM"]
|
||||
|
||||
[params]
|
||||
subtitle =
|
||||
subtitle = "Blog about my favorite topics"
|
||||
description = "This is my personal blog about tech."
|
||||
keywords = []
|
||||
images = []
|
||||
|
||||
# (Optional, default static/brand.svg) Set the path to a logo for the Geekblog
|
||||
# relative to your 'static/' folder.
|
||||
logo = logo.png
|
||||
logo = "logo.png"
|
||||
|
||||
# (Optional, default 6) Set how many table of contents levels to be showed on page.
|
||||
# Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/)
|
||||
@ -243,13 +248,13 @@ enableGitInfo = true
|
||||
|
||||
# (Optional, default none) Adds a "Hosted on <provider>" line to the footer.
|
||||
# Could be used if you want to give credits to your hosting provider.
|
||||
[geekblogHostedOn]
|
||||
name = Uberspace
|
||||
[params.geekblogHostedOn]
|
||||
name = "Uberspace"
|
||||
link = "https://uberspace.de/en/"
|
||||
|
||||
# (Optional, default none) Adds a "Content licensed under <license>" line to the footer.
|
||||
# Could be used if you want to define a default license for your content.
|
||||
[geekblogContentLicense]
|
||||
[params.geekblogContentLicense]
|
||||
name = "CC BY-SA 4.0"
|
||||
link = "https://creativecommons.org/licenses/by-sa/4.0/"
|
||||
```
|
||||
@ -266,8 +271,6 @@ theme: hugo-geekblog
|
||||
# Required to get well formatted code blocks
|
||||
pygmentsUseClasses: true
|
||||
pygmentsCodeFences: true
|
||||
enableGitInfo: true
|
||||
|
||||
disablePathToLower: true
|
||||
enableGitInfo: true
|
||||
|
||||
@ -282,6 +285,7 @@ markup:
|
||||
taxonomies:
|
||||
author: authors
|
||||
tag: tags
|
||||
series: series
|
||||
|
||||
mediaTypes:
|
||||
"application/atom+xml":
|
||||
@ -319,7 +323,7 @@ outputs:
|
||||
enableRobotsTXT: true
|
||||
|
||||
params:
|
||||
subtitle:
|
||||
subtitle: "Blog about my favorite topics"
|
||||
description: "This is my personal blog about tech."
|
||||
keywords: []
|
||||
images: []
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
{{ $description := default (default .Site.Title .Site.Params.description) (default .Summary .Description) }}
|
||||
{{ $keywords := default .Site.Params.Keywords .Keywords }}
|
||||
{{ $author := default (slice .Site.Params.GeekblogAuthor) .Params.authors }}
|
||||
{{ $authors := default (slice .Site.Params.GeekblogAuthor) .Params.authors }}
|
||||
|
||||
{{ with $description }}
|
||||
<meta name="description" content="{{ . }}">
|
||||
@ -11,14 +11,16 @@
|
||||
{{ with $keywords }}
|
||||
<meta name="keywords" content="{{ delimit . "," }}">
|
||||
{{ end }}
|
||||
{{ with $author }}
|
||||
{{ $authors := slice }}
|
||||
{{ with $authors }}
|
||||
{{ $list := slice }}
|
||||
{{ range sort . }}
|
||||
{{ with . }}
|
||||
{{ $author := index $.Site.Data.authors . }}
|
||||
{{ $authors = $authors | append $author.name }}
|
||||
{{ $list = $list | append $author.name }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $authors }}
|
||||
{{ with $list }}
|
||||
<meta name="author" content="{{ delimit . "," }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{{ if .IsHome -}}
|
||||
{{ $thumbnail := default (default "brand.svg" .Site.Params.logo) (index .Site.Params.images 0) | absURL }}
|
||||
{{ $thumbnail := default (default "brand.svg" .Site.Params.logo) (index (default slice .Site.Params.images) 0) | absURL }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
@ -43,12 +43,14 @@
|
||||
{{- with $authors }}
|
||||
"author" : [
|
||||
{{- range sort . }}
|
||||
{{- with . -}}
|
||||
{{- $ac = (add $ac 1) }}
|
||||
{{- $author := index $.Site.Data.authors . }}
|
||||
{
|
||||
"@type": "Person",
|
||||
"name": "{{ $author.name }}"
|
||||
}{{ if lt $ac $ac_max }},{{ end }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
],
|
||||
{{- end }}
|
||||
|
@ -7,10 +7,12 @@
|
||||
<a href='{{ .Permalink | relURL }}' class="gblog-footer__link">Feed</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ if (fileExists "contact.md") }}
|
||||
<span class="gblog-footer__item">
|
||||
<svg class="icon email"><use xlink:href="#email"></use></svg>
|
||||
<a href='{{ "contact" | relURL }}' class="gblog-footer__link">Contact</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.GeekblogLegalNotice }}
|
||||
<span class="gblog-footer__item">
|
||||
<a href="{{ . | relURL }}" class="gblog-footer__link">Legal Notice</a>
|
||||
|
Loading…
Reference in New Issue
Block a user