Skip to main content

Static site generator for GitHub Pages

Project description


Genja is a simple static site generator for GitHub Pages. It is a command line tool built in Python that generates HTML files and a JSON feed from Markdown content.


Download and install Python from or from Anaconda. Next, install genja from PyPI using the following command:

pip install genja

Check the installed version from the command line:

genja --version


Before running genja, you must create a project structure as shown below. The content/ directory contains Markdown files that are parsed by genja to create HTML files. The templates/ directory includes Jinja templates that are used to render the HTML pages. The docs/ directory contains the built website which can be hosted with GitHub Pages. Lastly, the config.json defines the URLs and directories used by genja.

|- content/
|- templates/
|- docs/
|- config.json

The config.json format is shown below. The base_url is the URL for the homepage of the website. The repo_name is the name of the GitHub repository for the project. Markdown files that are parsed by genja are located in the input_dir directory. The HTML files generated from genja are located in the output_dir directory. Static content such as images and CSS files should go in the output directory.

    "base_url": "",
    "repo_name": "mywebsite",
    "input_dir": "content",
    "output_dir": "docs"

Use the serve command to view the website in the default browser.

genja serve

Use the build command to build the website for hosting with GitHub Pages.

genja build


To run the example, go to the example directory in this repository. The mdcontent is the input directory containing the Mardkown files. The website is the output directory containing the built HTML files.

# Serve the example website
cd example
genja serve


Clone this repository and use the conda environment file to create a Python environment for developing genja. This environment uses flake8 for linting and pytest for running tests. Genja is installed in editable mode within the environment.

# Clone the project
git clone

# Create the conda environment
cd genja
conda env create --file environment.yml

# Activate the conda environment
conda activate genja


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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genja-23.1.tar.gz (61.7 kB view hashes)

Uploaded Source

Built Distribution

genja-23.1-py2.py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page