Skip to main content

Generate HTML files from Markdown files

Project description


Genja is a simple command line tool that generates HTML files from Markdown files.


Install from PyPI using the following command:

pip install genja

Check the installed version from the command line:

$ genja --version


Run genja from the command line by providing the input and output directories as arguments. The input directory contains the Markdown files and must contain a Jinja template file named template.html. This template is used to render the generated HTML files. The output directory is where the generated HTML files are written.

# Run genja where input is `content` directory and output is `website` directory.
# Input directory contains the Markdown files and Jinja template.
# Output directory contains the generated HTML files.
genja content website

Output from running the help command genja --help is shown below.

usage: genja [-h] [-v] input output

Generate HTML files from Markdown files.

positional arguments:
  input          directory of Markdown files and Jinja template
  output         directory for generated HTML files

  -h, --help     show this help message and exit
  -v, --version  show program's version number and exit


To run the example, go to the example directory in this repository. Use the mdcontent as the input directory and the website as the output directory. Notice the template file used by genja is located in the mdcontent directory. The index file links to the generated HTML pages. The template and index files are created by the user, not by genja.

# Run the example
cd example
genja mdcontent website


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-22.11.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

genja-22.11-py2.py3-none-any.whl (4.0 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