mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-25 06:20:40 +00:00
docs: add information how to use authors
This commit is contained in:
parent
9773442a7b
commit
36f8fe83b2
@ -3,6 +3,7 @@ title: Getting Started
|
||||
date: 2020-07-15T20:00:00+02:00
|
||||
authors:
|
||||
- john-doe
|
||||
- Special User
|
||||
tags:
|
||||
- Documentation
|
||||
weight: 1
|
||||
@ -511,6 +512,38 @@ The theme bundles just a small set of hand crafted icons.
|
||||
|
||||
{{< sprites >}}
|
||||
|
||||
## Setup Authors
|
||||
|
||||
The theme supports multiple authors. The required information for each author need to be stored in a single [Hugo data template](https://gohugo.io/templates/data-templates/) per author. These files need to be stored in the `data/authors/` directory in your projects root:
|
||||
|
||||
```Shell
|
||||
data/
|
||||
└── authors
|
||||
├── john-doe.yml
|
||||
├── richard-roe.yml
|
||||
└── Special User.yml
|
||||
```
|
||||
|
||||
The name of the file will be used as the reference later, so if you prefer some kind of naming convention this need to covered by the file names. Example authors file:
|
||||
|
||||
```YAML
|
||||
name: John Doe
|
||||
email: john@example.com
|
||||
```
|
||||
|
||||
With the defined files, you can add as many authors as you want to the front matter of your posts:
|
||||
|
||||
```Markdown
|
||||
---
|
||||
title: Demo Posts
|
||||
authors:
|
||||
- john-doe
|
||||
- Special User
|
||||
---
|
||||
|
||||
My first demo post.
|
||||
```
|
||||
|
||||
## Known Limitations
|
||||
|
||||
### Minify HTML results in spacing issues
|
||||
|
Loading…
Reference in New Issue
Block a user