A Simple and Minimalist theme with a focus on typography and content.
Zola port of hugo-theme-sam.
This is a port of the original hugo-theme-sam theme for Hugo (License).
See upstream
for source code take from there.
The easiest way to install this theme is to either clone it ...
git clone https://github.com/janbaudisch/zola-sam.git themes/sam
... or to use it as a submodule.
git submodule add https://github.com/janbaudisch/zola-sam.git themes/sam
Either way, you will have to enable the theme in your config.toml
.
theme = "sam"
Sam supports the tags
and authors
taxonomies.
To use them, declare them in your config.toml
:
taxonomies = [
{ name = "tags", rss = true },
{ name = "authors", rss = true }
]
Set them in your page's frontmatter:
[taxonomies]
tags = ["some", "tag"]
authors = ["Alice", "Sam"]
See Zola's documentation for more details.
See config.toml
for an example configuration.
The menu on the index page is created as follows: If the sam_menu
variable is set, it gets used.
[extra]
sam_menu = [
{ text = "posts", link = "/posts" },
{ text = "about", link = "/about" },
{ text = "github", link = "https://github.com" }
]
If it is not set, all sections under content
will get linked.
This variable decides wether the menu - as mentioned above - will also be displayed at the bottom of pages.
Default: false
[extra]
sam_bottom_menu = true
Sets the name for all links referring to the home page in the menus and the 404 page.
Default: home
[extra]
home = "home"
Specifies how to display dates. The format is described here.
Default: %a %b %e, %Y
[extra]
date_format = "%a %b %e, %Y"
You can enable or disable word count and reading time for posts across the whole site:
Default: true
(both)
[extra]
show_word_count = true
show_reading_time = true
If enabled, you can opt-out per page via front-matter:
Default: false
(both)
+++
[extra]
hide_word_count = true
hide_reading_time = true
+++
If you want to disable the complete header of a page (for example a page which is explicitly not a post), you can do so via front-matter:
Default: false
+++
[extra]
no_header = true
+++
To place some text at the end of pages, set the following:
[extra.sam_footer]
text = "Some footer text."