Skip to main content

Genja

Genja is a simple static website generator. It is a Python command line tool that generates HTML files and a JSON feed from Markdown content.

Installation

Install uv using the installation steps at https://docs.astral.sh/uv. After installing uv, use the uv tool command to install Genja as a command line tool on your computer:

uv tool install genja

Check the installed version from the command line to make sure installation was successful:

genja --version

Usage

Before running Genja, create a project structure as shown below. Markdown files go into the _pages and _posts directories. The pages directory is for standalone content that is not dated such as an about page or contact page. The posts directory is for dated content such as blog posts or articles. The _templates directory contains Jinja templates that are used to render the HTML pages. The mysite directory contains the generated website which can be hosted with GitHub Pages or some other web hosting platform. Lastly, the genja.toml file defines the URLs and directories for the project.

myproject/
├── mysite/
│   ├── img/
│   └── styles.css
├── _pages/
│   ├── about.md
│   └── contact.md
├── _posts/
│   ├── apple.md
│   └── orange.md
├── _templates/
│   ├── index.html
│   ├── page.html
│   └── post.html
└── genja.toml

The items in the genja.toml file are shown below. The base_url is the URL for the homepage of the website. The posts_output defines the output directory for the generated posts. The HTML files generated from Genja are located in the site_output directory. Static content such as images and CSS files should go in this directory. The title of the website is defined by the title key.

base_url = "https://example.com"
posts_output = "blog"
site_output = "mysite"
title = "My Website"

Use the serve command to build the website and start a local server. This will automatically open the default web browser to view the website. The website will automatically reload when changes are saved to the Markdown files.

genja serve

Use the build command to build the website without running a local server.

genja build

Examples

See the examples directory in this repository for projects that can be built with Genja. For more information about each example, see the Examples section in the Genja documentation.

Contributing

See the CONTRIBUTING.md document for information about contributing to this project.

Support

Support this project by using the :heart: Sponsor button at the top of this page. Thank you :smile:.

License

This project is licensed under the terms of the MIT license. See the LICENSE document for the license text.

Metadata

Release files for genja 25.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for genja 25.10
File Size Uploaded
genja-25.10.tar.gz 516.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for genja 25.10
File Interpreter ABI Platform
genja-25.10-py3-none-any.whl Python 3 none any Details

Total release size: 562.8 kB

Release files / genja-25.10.tar.gz

Download URL genja-25.10.tar.gz
Size 516.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5b1f05ebe16cb7df8fc425fe3c06f1dc0ed0e4f38c630e7ec97bbc3f0102164d
BLAKE2b-256 checksum
How to use checksums
8686bbd8e40e1b8bc0b91a84364106aab7c6938d9cad52b157762bec02326132
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Release files / genja-25.10-py3-none-any.whl

Download URL genja-25.10-py3-none-any.whl
Size 46.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0eeb68bd02391f3211f48a1571d8e833690e926cf851279808872879ef8332f0
BLAKE2b-256 checksum
How to use checksums
814e03127d56e6d4a2c3a5b14f1d3bdf87506dae5c32b7da7d0e6636a79ecea4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Release history Release notifications | RSS feed

This release

25.10 This release

2 release files

25.9

2 release files

25.8

2 release files

25.3.1

2 release files

25.3

2 release files

25.2

2 release files

24.11

2 release files

24.10

2 release files

24.3

2 release files

24.2

2 release files

23.12

2 release files

23.3

2 release files

23.2

2 release files

23.1

2 release files

22.11

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page