-
Notifications
You must be signed in to change notification settings - Fork 23
Content
Apart from the main site configuration, the individual blog posts and about page also have their own set of configuration.
All content should be placed in the ./content/
folder.
Blog posts should be put into the blog
folder. Each blog post should have its own subfolder. The name of that subfolder will define the url of the blog post, i.e. if you create the folder ./content/blog/post1/
, the blog post will have the following url: https://example.com/blog/post1/
.
You can change the name of the blog
folder, see this section for more details.
The main _index.md
file in the blog
folder only sets one thing: The title of the https://example.com/blog/
page (default is "Blog").
Each blog post subfolder must contain a index.md
file. This file will hold the configuration and the blog post itself. The configuration is defined in the frontmatter
at the top of the page. The frontmatter section is fenced by ---
and defines some key/value pairs in yaml.
Below is a general blog post frontmatter section with all posible configuration defined. All images referenced in the frontmatter must be placed in the assets
folder or a subfolder under assets. Even if images are placed in subfolders they must have a unique name!
---
# general config
title: Blog Post
subtitle: "Blog post subtitle :zap:"
date: 2023-11-24
# card specific config
summary: A summary of the blog post
cardimage: photo1_card.jpeg
authors:
- John Doe: author.png
# post specific config
featureimage: photo1.jpeg
caption: Some image caption
toc: true
---
The title
, subtitle
and date
should be self explanatory.
The summary
defines a short summary that will be displayed in the overview card. It'll be automatically cut short if it's too long, in order to perserve the alignment between multiple cards. The cardimage
should point to an image that will be displayed on the card. If no image is defined or the specified image can't be found, no image will be displayed. A list of authors can be defined for the authors
configuration. The referenced image(s) will be displayed in the bottom left section of the card.
Setting a featuredimage
and caption
will place the image as the first thing in the blog post, using the supplied caption. Other images can be added to the blog post by using the inline shortcode figarray.
The last configuration is the toc
. If set to true
a table of content will be generated at the top of the blog post. The TOC will reference all headlines from weight h2
to h4
(## to ####).
Images can be placed in a blog post by using the figArray
shortcode that's provided along side the theme. Simply place the following shortcode where you want the image, or images, to appear in the main text:
{{< figArray subfolder="<subfoldername>" figCaption="Some caption" numCols=2 >}}
The images that should be used must be placed in a subfolder of the blog post folder, i.e. /post1/imagefolder1/
. All images put into this folder will be displayed. The two optional parameters are figCaption
and numCols
. numCols
define the number of columns to use if multiple images are supplied.
If numCols
is not set, the shortcode will try to arrange the images in a "nice" grid.
The about page also have some specific configuration. These are set in the about.md
file, placed directly under the content
folder (./content/about.md
). Just like with the blog posts, these are also defined in the frontmatter. A general frontmatter section is defined below:
---
# don't change this!
type: misc
# change these
name: John Doe
jobTitle: Blogger
icon: ":coffee:"
bio: true
---
The name
and jobTitle
defines the main title and subtitle for the about page. The icon
defines which emoji to display next to the main image. The emoji will default to the one used on the main page, if not set here.
If bio: false
the main text will not be displayed.