Kobold is a static site generator with a friendly CLI.
You can install Kobold via cargo:
cargo install kobold-ssg
As long as $CARGO_HOME/bin
(that is, typically, ~/.cargo/bin
) is in your PATH
, you can then use the kobold
command from the command line as any other CLI program.
Create a new Kobold project:
$ kobold init hello_kobold
This creates the hello_kobold
directory and initializes it as a git repository with the directory structure that
Kobold requires:
hello_kobold/
├── assets/
├── content/
│ └── index.md
├── styles/
└── templates/
└── default.html
All sub-directories except content
can be empty or can be omitted from your project.
The project can contain sub-directories with other names, but sub-directories site
and site.old
are reserved for
usage by Kobold.
If you have used any other static site generator, you can probably guess how Kobold works based on this directory structure.
The index.md
file is the main page of the website, and starts with the following contents:
title: Home
```
You can already generate the output website:
$ kobold build hello_kobold
That command creates a site
sub-directory in the hello_kobold
directory with the generated website.
You can visit the website with your favourite web browser:
$ firefox hello_kobold/site/index.html
/tags
page that categorizes website contents by tag (turn it off with build --no-tags
)build --with-search-bar
option)I wanted a personal website and I wanted to practice my Rust.
Kobold was written from scratch, but it has many similarities to the more mature
Zola and Cobalt.
Kobold lacks many of their features, but in exchange it tries to be so easy to use that you
basically can start working on your website without reading any docs, just playing with the kobold
command.
I also appreciate Hugo's focus on speed and its no-nonsense workflow, and shortcodes make a lot of sense so Kobold's templates try to replicate some of that usefulness.
Not a static site generator per se, but a honorable mention goes to Sylvain Kerkour's Building a static site generator in 100 lines of Rust which was a great resource to get me started.
Contributions in the form of issues and pull requests are welcome.