Skip to content
/ layla Public

A very simple static site generator written in Python

Notifications You must be signed in to change notification settings

g9h0/layla

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

layla cat

What is Layla?

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.

Build and install

  1. Install Poetry
pipx install poetry
  1. Clone and cd into this repository
git clone https://github.com/g9h0/layla.git && cd layla
  1. Build and install layla
poetry build && pip install dist/layla-0.1.0.tar.gz

How to use

  1. Create a directory and cd into it
mkdir my-blog && cd my-blog
  1. Initialise a new blog
layla init
  1. 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
  1. Build the static. The --md parameter takes a path containing the markdown files
layla build --md content
  1. Inspect and open html/index.html

Customization

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.

About

A very simple static site generator written in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published