/mysgen

My static site generator.

Primary LanguagePythonMIT LicenseMIT

mysgen

test coverage lint type

Python 3.8 - 3.11 Testing framework: pytest Linter and formatter: ruff Type checker: mypy

A very simple static site generator used for mladen.gibanica.net built using Python and Jinja2.

The configuration file config.json should contain the following

{
    "author": "Name",
    "sitename": "Site name",
    "siteurl": "https://address.com",
    "timezone": "Europe/Stockholm",
    "default_lang": "en-gb",
    "theme_path": "path_to_theme",
    "src_path": "path_to_content",
    "build_path": "path_to_build",
    "home": "home",
    "menuitems": {
        "home": "",
        "archive": "archive"
    },
    "post_url": "{{post_url}}",
    "build_date_template": "{{update_date}}",
    "thumbnail_size": [300, 300],
    "markdown_extensions": [
        "meta",
        "fenced_code",
        "mdx_math"
    ],
    "s3-bucket": "bucket",
    "mangle_image_name": true
}

Such a configuration assumes the following folder structure

root/
├─ config.json
├─ path_to_content/
│  ├─ data/
│  ├─ images/
│  ├─ pages/
│  │  ├─ home.md
│  │  ├─ archive.md
│  ├─ posts/
├─ path_to_theme/
│  ├─ css/
│  ├─ js/
│  ├─ templates/
├─ path_to_build/