Update docs regarding sections

pull/31/head
Jan-Lukas Else 2 months ago
parent 013bfe84b8
commit 395687a315
  1. 15
      docs/config.md
  2. 1
      docs/index.md
  3. 11
      example-config.yml

@ -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
sections:
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))
micro:
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
taxonomies:
- name: tags # Code of taxonomy (used via post parameters)

Loading…
Cancel
Save