Update docs regarding sections

Jan-Lukas Else 8 months ago
parent 013bfe84b8
commit 395687a315

@ -0,0 +1,15 @@
# How to configure GoBlog
Most settings for GoBlog (still) have to be configured using a YAML configuration file. See `example-config.yaml` for the available options. It's recommended to just set the settings you really need. There are defaults for most settings. Some settings can be configured using a web UI (with the path of `/settings`).
## Sections
You can add, remove or update sections and the default section using the web UI.
Sections can have a title, description (with support for markdown) and a path template which gets used when creating a new post without a pre-setted path. The syntax for the path template is gets parsed as a [Go template](https://pkg.go.dev/text/template#pkg-overview). Available variables are: `.Section`, `.Slug`, `.Year`, `.Month`, `.Day` and `.BlogPath`.
Example for the path template:
{{printf \"/%v/%v\" .Section .Slug}}

@ -56,5 +56,6 @@ Here's an (incomplete) list of features:
- [How to install and run GoBlog](./install.md)
- [How to build GoBlog](./build.md)
- [How to use GoBlog](./usage.md)
- [How to configure GoBlog](./config.md)
- [Administration paths](./admin-paths.md)
- [GoBlog's storage system](./storage.md)

@ -181,17 +181,6 @@ blogs:
title: My awesome blog # Blog title
description: My awesome blog description # Blog description
pagination: 10 # Number of posts per page
# Sections
defaultsection: micro # Default section
posts: # Section code
title: Posts # Section title
pathtemplate: "{{printf \"/%v/%v\" .Section .Slug}}" # Template to generate post paths (available: .Section, .Slug, .Year, .Month, .Day, .BlogPath (useful for blogs on sub-paths))
title: Micro
description: "You can also use **Markdown** here." # Section description, can also use Markdown
pathtemplate: "{{printf \"/%v/%02d/%02d/%v\" .Section .Year .Month .Slug}}"
showFull: true # Show full post content instead of just the summary on index pages
# Taxonomies
- name: tags # Code of taxonomy (used via post parameters)