Layla
is a simple static site generator that is used to build the g9h.io blog. Layla
provides a command line interface for initializing and building a static site.
- Install Poetry
pipx install poetry
- Clone and cd into this repository
git clone https://github.com/g9h0/layla.git && cd layla
- Build and install
layla
poetry build && pip install dist/layla-0.1.0.tar.gz
- Create a directory and cd into it
mkdir my-blog && cd my-blog
- Initialise a new blog
layla init
- Create a blog post and save it to the
content
directory
cat << EOF > content/hello-world.md
---
title: Hello World
date: 2024-12-01
---
Hello Wolrd
EOF
- Build the static. The
--md
parameter takes a path containing the markdown files
layla build --md content
- Inspect and open
html/index.html
You can customize the blog site by editing the template files in the templates
directory and running layla build
.
html/bg.png
is created on layla init
. To update or remove the background image, simply replace or delete html/bg.png
. If you are removing the background image, you should remove the reference from templates/stylesheet.css
and run layla build
.