Skip to main content

My simple static site generator.

Project description

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/

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

mysgen-0.4.4.tar.gz (20.1 kB view hashes)

Uploaded Source

Built Distribution

mysgen-0.4.4-py3-none-any.whl (7.0 kB view hashes)

Uploaded 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