Skip to main content

A Python-based static site generator for building sites from Markdown and JSON files

Project description

Netlify Status PyPI - Python Version PyPI - Version GitHub License GitHub Actions Workflow Status

Shodo Static Site Generator 🪶✒️📜

Shodo is a framework for rapidly building a static site from markdown files, json, and Jinja templates. Simply make changes to your site in the src directory, run the build command, and access the build in the dist directory. Easily deploy to Netlify in just a few clicks.

Check out shodo.dev for the latest project updates and documentation!

Why Shodo?

There is no shortage of options out there for building websites and apps, but they can quickly feel overcomplicated when all you need is a simple website with a few reusable components, or a quick solution to setting up a blog with an RSS feed. The goal of Shodo is to make publishing content to the web as simple and elegant as possible for developers, whether it's a personal blog, a portfolio, documentation, or a professional marketing site.

Key Features:

  • ✅ Write content in Markdown with front matter support
  • ✅ Powerful Jinja2 templating with custom API functions
  • ✅ Query JSON data with filtering, sorting, and pagination
  • ✅ Automatic page generation from markdown articles
  • ✅ Built-in pagination for article listings
  • ✅ RSS/Atom feed generation support
  • ✅ Nested layouts and partial templates
  • ✅ Fast build times with automatic asset compilation

Getting Started

Installing the package

  1. Create a new project directory and start a virtual environment using your preferred method

  2. Install the shodo_ssg package by running one of the following commands:

Via pip:

pip install shodo-ssg

Via pipenv:

pipenv install shodo-ssg

Via Poetry:

poetry add shodo-ssg

Via uv:

uv add shodo-ssg
  1. Once the package is installed, you can scaffold a new project using the command
start-shodo-project <name of project directory>

To create the project in the current directory, run

start-shodo-project .
  1. Build the starter site and serve it to localhost by running the following command from the root directory of the project:
python serve.py

You should now be able to view the site on localhost and can start by making changes to home.jinja. When you simply want to build the static site, run the following command from the root directory:

python site_builder.py

and you can find your static site located in the dist/ directory

Docs

Visit shodo.dev/docs to learn more!

Project Conventions

Jinja templates

For all jinja templates, use the .jinja file extension. Other extensions such as .j2 or .jinja2 are not fully supported at this time.

Syntax Highlighting

If you're using VSCode, the Better Jinja extension is recommended for full syntax highlighting out of the box using the .jinja extension. Other extensions will work, although you might need to configure the settings to look for the .jinja extension.

For Contributors

Code style: black

This project uses the Black Formatter and follows the current style guide

Pulling down the repository and installing locally
  1. Start up a virtual environment and install the dev dependencies using your preferred method after pulling down the repository

  2. Once your virtual environment is activated, in the root of the project directory run pip install -e .

  3. Upon successful install, navigate to an entirely separate directory and run

start-shodo-project <name of new project directory>

Upon success, a new starter project template should have been set up in the specified directory

Download files

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

Source Distribution

shodo_ssg-0.0.1a2.tar.gz (82.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shodo_ssg-0.0.1a2-py3-none-any.whl (72.4 kB view details)

Uploaded Python 3

File details

Details for the file shodo_ssg-0.0.1a2.tar.gz.

File metadata

  • Download URL: shodo_ssg-0.0.1a2.tar.gz
  • Upload date:
  • Size: 82.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.17

File hashes

Hashes for shodo_ssg-0.0.1a2.tar.gz
Algorithm Hash digest
SHA256 10eca063f990ed71b312c773fa1da3c29d66e96839137dea25041abe35ea45e0
MD5 3a603e88edee0f39d8c5553fb1c3bc09
BLAKE2b-256 b1b36ed3d9ea2efe0e1b4a911741757d1768a03b458e85f64727265efa785484

See more details on using hashes here.

File details

Details for the file shodo_ssg-0.0.1a2-py3-none-any.whl.

File metadata

  • Download URL: shodo_ssg-0.0.1a2-py3-none-any.whl
  • Upload date:
  • Size: 72.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.17

File hashes

Hashes for shodo_ssg-0.0.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 deb2b6a429b9f296b376d8d2f1169eed00b4e198e28694fd24471e5c3c0a6ae5
MD5 042c44b700bf797eade2d6c2a6754f06
BLAKE2b-256 752634dc3ef79278336b09d76f675e526c8244c93e4887b5287f2c98393ccc59

See more details on using hashes here.

Supported by

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