Skip to main content

sgelt

A simple static site generator for research labs.

Sgelt builds a complete static website from Markdown content, Jinja2 templates, and JSON data files. It is designed for research institutions: seminars, conferences, defenses, team pages, news, and a searchable index.

coverage

Features

  • Markdown content with YAML frontmatter
  • Jinja2 templates for full layout control
  • Agenda (seminars, conferences, defenses) with pagination by year
  • Team pages with members and organizing seminars
  • News with paginated indexes
  • iCal export for seminar calendars
  • Lunr.js search index
  • Systematic checks (sgelt --check): broken links, orphan assets, duplicates
  • Dev server with livereload (sgelt --serve)

Installation

pip install sgelt
# or
uv add sgelt

Quick start

mkdir mysite && cd mysite
sgelt --init        # scaffold: templates/, config.yml, content/index.md
sgelt               # build the site
sgelt --serve       # build + dev server on http://localhost:5500

sgelt --init creates a complete project structure with starter templates bundled in the package (sgelt/templates/). Edit config.yml and content/index.md, then build.

Demo site

To see what a complete site looks like, generate one with random demo content:

mkdir mysite && cd mysite
sgelt --init --demo # scaffold + random news, teams, seminars, conferences
sgelt --serve       # preview at http://localhost:5500

--demo uses Faker to generate realistic but entirely fictional content: news articles, team pages with members, seminar series, conferences, and defenses (2020-2026). Requires the demo extra: pip install "sgelt[demo]".

A live demo is published at irma.pages.math.unistra.fr/sgelt.

Manual setup

Create a site project with this structure:

mysite/
├── config.yml          # site configuration
├── content/            # Markdown pages
│   ├── home/           # homepage cards
│   ├── teams/          # team pages
│   └── ...
├── templates/          # Jinja2 templates (copy from sgelt --init or customize)
├── static/             # CSS, JS, images
├── data/               # JSON data (agenda, teams)
│   ├── archive/        # agenda archive by year
│   └── teams.json      # team members
└── output/             # generated site (git-ignored)

Then build:

cd mysite
sgelt           # build the site
sgelt --check   # run checks
sgelt --serve   # build + dev server on http://localhost:5500
sgelt --clean   # remove output/

Configuration (config.yml)

site:
  title: "My Lab"
  url: "https://lab.example.org"
  # today: 2026-10-23  # override date for reproducible builds

nav_items:
  Home: index.html
  Team: teams/index.html
  Agenda:
    Upcoming: agenda/a_venir.html

Data files

  • data/archive/<year>.json — agenda archive (seminars, conferences, defenses)
  • data/agenda_indico.json — optional Indico events (merged with archive)
  • data/teams.json — team members and affiliations

See data/*.schema.json for the expected JSON schemas.

Development

git clone <repo>
cd sgelt
uv sync --extra dev
uv run pytest -q
uv run ruff check
uv run ty check

Releasing

  1. Bump __version__ in src/sgelt/__init__.py

  2. Add a new entry at the top of CHANGELOG.md (Keep a Changelog format)

  3. Merge to main

  4. Create an annotated tag with the new CHANGELOG entry as the message:

    git tag -a vX.Y.Z -m "$(sed -n '/^## \[X\.Y\.Z\]/,/^## \[/p' CHANGELOG.md | head -n -1)"
    git push origin vX.Y.Z
    

    Or copy-paste the CHANGELOG block into the tag description field in the GitLab UI (Tags → edit).

The CI (release_to_gitlab) reads the tag message via git tag --format and passes it to glab release create --notes-file, so backticks and other special characters are preserved as-is (no shell interpretation).

License

MIT

Metadata

Release files for sgelt 5.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sgelt 5.1.5
File Size Uploaded Provenance Actions
sgelt-5.1.5.tar.gz 69.8 kB Without provenance Details for sgelt-5.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sgelt 5.1.5
File Interpreter ABI Platform Actions
sgelt-5.1.5-py3-none-any.whl Python 3 none any Details for sgelt-5.1.5-py3-none-any.whl

Total release size: 122.9 kB

Release files / sgelt-5.1.5.tar.gz

Download URL sgelt-5.1.5.tar.gz
Size 69.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1e68975c5739d8dc2f70264d7feb8e0f4c08f86da824766bbec69cdf73090970
BLAKE2b-256 checksum
How to use checksums
3558b475b0b85c74ac2cff60ae0f1b8f76f8b3fbdf3b96e014a7b64bb8783551
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Release files / sgelt-5.1.5-py3-none-any.whl

Download URL sgelt-5.1.5-py3-none-any.whl
Size 53.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e41a77b2c0c8bc6a549cf2c3218a42daa777d9bb350e7339d84687ad7879532
BLAKE2b-256 checksum
How to use checksums
b0d6d62ba41a07d4d2e228cfecc817349c4da07a711d0a5be0194c546d6bf47e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Security for sgelt 5.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page