Configuration
With Multi-lang enabled #
Necessary Configuration changes #
To support Multiple authors, we need to meet a few expectations. This is a minimal example from following the Hugo quick-start example
- Hugo configuration
- taxonomy
# config/_default/taxonomies.yaml
contributor: contributors
- permalinks
# config/_default/permalinks.yaml
contributor: "/:section/:slug"
-
Top-level Directories
data/contributors
content/contributors
-
Per-contributor Directories
content/contributors/contributor-name
-
Per-contributor Files:
data/contributors/contributor-name.json
content/contributors/contributor-name/_index.md
Site Data #
Create the directory data/contributors
in your project. This will be where you store the specific data which is unique to any one particular contributor.
Per-Contributor datafile: #
Each datafile must be named contributor-key
.json
1
/data/contributors/wolf-noble.json
:
{
"name": "Wolf Noble",
"externalFeaturedImage": "img/contributors/wolf-noble/wolf.jpg",
"feature": "img/contributors/wolf-noble/wolf.jpg",
"image" : "img/contributors/wolf-noble/wolf.jpg",
"bio": "Mad Scientist",
"byline_title": [
{ "default": "Bitmines Employee of the day." },
{ "en": "Digital Mop Driver" },
{ "brk": "Minion" }
],
"headline": "Everything, Nothing, and Anything.",
"social": [
{ "linkedin": "https://linkedin.com/in/wolfspyre" },
{ "twitter": "https://twitter.com/loiosh" },
{ "instagram": "https://instagram.com/wolfspyre" },
{ "gitlab": "https://gitlab.wolfspyre.io/wolfspyre"},
{ "gitlab": "https://gitlab.com/wolfspyre"},
{ "github": "https://github.com/wolfspyre"},
{ "blog": "https://blog.wolfspyre.io"},
{ "keybase": "https://keybase.io/wolfspyre" },
{ "steam": "https://steam.com/loiosh"},
{"soundcloud": "https://soundcloud.com/loiosh"},
{ "reddit": "https://reddit.com/user/loiosh" }
]
}
Per-Contributor markdown file: #
Each contributor’s information will be coalesced from the datafile, and presented by rendering the contents of the markdown file in the relevant contributors’ pagebundle.
Configuration Parameters #
Site params #
config/_default/languages.XYZ.yaml: #
#config/_default/languages.LANGHERE.yaml
params:
author:
name: "WolfspyreLabs"
image: "/Wolfspyre_Logo.svg"
headline: "Failure is an inexorable part of Creation"
bio: "It's a dangerous thing to mistake speaking without thought with speaking the truth."
byline_title:
- "default": "Site Admin"
- "en": "Likely helpful information."
links:
email:
- "mailto:site@wolfspyre.com"
discord:
- "https://discord.gg/EXSnM6vuP8"
gitlab:
- "https://gitlab.wolfspyre.io/hoof-and-paw"
instagram:
- "https://instagram.com/hoof.and.paw"
params.yaml: #
config/_default/params.yaml
:
contributor presentation configuration:
#config/_default/params.yaml
---
contributors:
list:
cardView: true
cardstyle: "bare" #bare profile
single:
cardView: true
cardStyle: "profile"
contributor presentation parameters:
#config/_default/params.yaml
article: #also
showContributorsAt: "top"
showContributors: true
showContributorsImages: true
showContributorsTags: true
showAuthor: true
showAuthorImage: true
showAuthorTags: true
showAuthorAt: "bottom"
Page Metadata #
every page
Taxonomy #
in /config/_default/taxonomies.yaml
:
# config/_default/taxonomies.yaml
_merge: deep
contributor: contributors
Optional Configuration changes #
Card formats #
Bare #
Basic #
Profile #
-
This could also be
.yaml
,.toml
,.csv
or any other data file that hugo supports as a data container format. ↩︎