Hacker theme for Zola

Zola Hacker is a minimalistic theme for Zola, inspired by the Hacker theme for Jekyll. It is designed for developers who want to write blogs.

Demo

Live Preview.

Requirements

Before using the theme, you need to install the Zola ≥ 0.19.1.

Quick Start

git clone git@github.com:en9inerd/zola-hacker.git
cd zola-hacker
zola serve
# open http://127.0.0.1:1111/ in the browser

Installation

Just earlier we showed you how to run the theme directly. Now we start to install the theme in an existing site step by step.

Step 1: Create a new zola site

zola init mysite

Step 2: Install Zola Hacker Theme

Download this theme to your themes directory:

cd mysite/themes
git clone git@github.com:en9inerd/zola-hacker.git

Or install as a submodule:

cd mysite
git init  # if your project is a git repository already, ignore this command
git submodule add git@github.com:en9inerd/zola-hacker.git themes/hacker

Step 3: Configuration

Enable the theme in your zola.toml in the site directory:

theme = "hacker"

Or copy the zola.toml from the theme directory to your project's root directory:

cp themes/hacker/zola.toml zola.toml

Step 4: Add new content

You can copy the content from the theme directory to your project:

cp -r themes/hacker/content .

You can modify or add new posts in the content/posts, content/pages or other content directories as needed.

Step 5: Run the project

Just run zola serve in the root path of the project:

zola serve

This command will start the Zola development web server accessible by default at http://127.0.0.1:1111. Saved changes will live reload in the browser.

Customization

You can customize your configurations, templates and content for yourself. Look at the zola.toml, theme.toml, content files and templates files in this repo for an idea.

Global Configuration

There are some configuration options that you can customize in zola.toml.

Configuration options before extra options

Set the tags taxonomy in the zola.toml:

taxonomies = [
    { name = "tags" },
]

Configuration options under the extra

The following options should be under the [extra] in zola.toml

Templates

All pages extend the base.html, and you can customize them as need.

Shortcodes

The theme provides some shortcodes to help you write your content:

contact_form The contact_form shortcode is based on Google Apps Mail to send emails without a server. It depends on contact_form_script_id in the zola.toml.

{{ contact_form() }}

cv The cv shortcode is used to display the CV in the page. Data for CV is stored in yaml format in the data/cv directory.

{{ cv() }}

github_avatar The github_avatar shortcode is used to display the GitHub avatar image. It depends on extra.github.username in the zola.toml. Also, you can pass size as an argument.

{{ github_avatar(size=100) }}

projects The projects shortcode is used to display repositories from GitHub. It depends on extra.github.username in the zola.toml and extra.repo_names in page front matter to filter the repositories.

{{ projects() }}

Reporting Issues

We use GitHub Issues as the official bug tracker for the Zola Hacker Theme. Please search existing issues. It’s possible someone has already reported the same problem.

If your problem or idea is not addressed yet, open a new issue.

License

Zola Hacker Theme is distributed under the terms of the MIT license.