Information

01 Jan 2024

Usage guide

1 minute reading time

Updated 01 Feb 2024

#Features

Halve-Z is a retro two-column theme for Zola. It features search, taxonomies, automatic color schemes, media shortcodes, project cards, and a comment system (Cactus/Giscus).

#Front matter

Available (extra) options:

h1 headers are reserved for page title (left/top block) and subtitle (optional, right/bottom block).

In addition to default variables, a page can have an image, a subtitle, a category, a song, CSP strings, and multiple tags.

+++
title = "Example"
date = 2009-09-09
[taxonomies]
categories = ["general"]
tags = ["tag"]
[extra]
subtitle = "Example subtitle"
disable_comments = true
disable_toc = true
image = "https://example.com/image.png"
csp_img = ["example.com/", "foo.org/example"]
song = ["Michael Pitt", "Death to Birth"]
+++

song variable takes an array that includes an artist and a track name. If LASTFM_KEY environment variable is present, names are autocorrected and linked to the Last.fm website.

#Configuration

Set theme to halve-z in your project's config.toml and adjust options according to the example below:

###
base_url = "https://bitbytelab.io"
title = "The Bit Byte Lab"
description = "A blog about technology, programming, and other things."
default_language = "en"
author = "bitbytelab.io"
theme = "halve-z"

compile_sass = true
minify_html = true
generate_feeds = true
build_search_index = true
generate_sitemap = true

taxonomies = [
    { name = "categories", feed = true },
    { name = "tags", feed = true },
]

[search]
include_title = true
include_description = true
include_path = false
include_content = true
index_format = "elasticlunr_json"

[markdown]
highlight_code = true
highlight_theme = "css"
highlight_themes_css = [
    { theme = "OneHalfDark", filename = "syntax-theme-dark.css" },
    { theme = "OneHalfLight", filename = "syntax-theme-light.css" },
]
render_emoji = false
external_links_target_blank = true

[slugify]
paths = "safe"
taxonomies = "safe"
anchors = "safe"

[extra]
locale = "en_US"
logo = "android-chrome-192x192.png"
manifest = "manifest.json"
read_time = true
toc = true
csp = true

[extra.placeholders]
tags = false
subtitle = false

[extra.home]
title = "The Bit Byte Lab"
subtitle = "Hey there, fellow enthusiasts! 🖖 We're Bit Byte Lab, a bunch of tech-obsessed nerds who live and breathe innovation. Software development, quantitative finance, and cyber security are our playgrounds, and curiosity is our compass."
glitch = true
logo = { enabled = false, height = "100", width = "100" }
footer = true

[extra.images]
home = "home.png" #https://failsafe.monster/c1tyh4ll.png
post_list = "city-bg.png" #https://failsafe.monster/bk-prk.jpg
default_post = "city-bg.png" #https://failsafe.monster/bk-prk.jpg
categories = [
    { name = "media", image = "https://raw.githubusercontent.com/bearcott/8bit-art/master/cities/urban.gif" },
]

[extra.menu]
posts = true
posts_label = "Posts"
links = [{ name = "Code", url = "@/pages/projects.md" }]

[extra.footer]
enabled = true
author = true
copyright = true
hash = false
stack = false
links = [{ name = "posts", url = "@/posts/_index.md" }]

[extra.social]
# email = "[email protected]"
github = "bitbytelabio"
# mastodon = "server/@user_name"
# twitter = "user_name"
# facebook = "user_name"
# codeberg = "username"
# gitlab = "user_name"
# bitbucket = "user_name"
# stackoverflow = "12345/user_name"
# linkedin = "user_name"
# instagram = "user_name"
# lastfm = "user_name"
# twitch = "user_name"
# reddit = "user_name"
# flickr = "user_name"
# keybase = "user_name"
# hackernews = "user_name"

[extra.comments]
system = "none"

[extra.comments.cactus]
site = "site_name"
page_size = 10
guest_posting = true
update_interval = 0

[extra.comments.giscus]
repo = "user_name/repo"
repo_id = ""
category = "Comments"
category_id = ""
mapping = "pathname"
strict = "1"
reactions = "1"
lang = "en"