2
1
Fork
You've already forked merch
1
No description
  • Jinja 36.4%
  • CSS 32.5%
  • SCSS 14.6%
  • Python 9.3%
  • JavaScript 6.9%
  • Other 0.2%
2026年07月11日 15:54:47 +02:00
.forgejo/workflows CICD: Post staging URL automatically 2026年04月03日 13:06:00 +02:00
data Küchenhelfa: Fix copy/paste mistake in model name 2026年07月11日 15:51:28 +02:00
datasheets Add: Küchenhelfa Antifa Shirts 2026年07月11日 15:31:21 +02:00
images Küchenhelfa: Add clothing images 2026年07月11日 15:31:23 +02:00
locales Fix typo in german locale 2026年07月08日 00:31:11 +02:00
script add filter data & update model data with actual fits 2026年03月01日 17:27:23 +01:00
style style year-headings 2026年07月11日 15:21:29 +02:00
templates style year-headings 2026年07月11日 15:21:29 +02:00
.envrc Add direnv support 2026年07月07日 20:06:44 +02:00
.gitignore WIP static site generation; major restructuring 2025年07月07日 13:39:09 +02:00
.mailmap Add .mailmap and map old forgejo mail 2026年05月01日 09:55:37 +02:00
.prettierrc.json Allow linewidth of 120 for scss files 2025年12月07日 13:17:33 +01:00
.python-version Change python version for compatibility reasons 2025年11月02日 14:38:39 +01:00
babel.cfg add translation logic 2025年10月15日 16:11:38 +02:00
build.sh replace pipenv by uv 2025年11月02日 01:42:31 +01:00
Caddyfile.dev Fix Caddyfiles for new deployment 2025年12月13日 21:21:56 +01:00
Caddyfile.example.proxy Fix Caddyfiles for new deployment 2025年12月13日 21:21:56 +01:00
generate.py Overview: Group entries by year; extra group for specials 2026年07月11日 14:09:50 +02:00
pyproject.toml reformat with new black version 2026年02月25日 11:37:16 +01:00
README.md Allow linewidth of 120 for scss files 2025年12月07日 13:17:33 +01:00
shell.nix Fix uv on NixOS 2025年11月02日 12:51:15 +01:00
uv.lock reformat with new black version 2026年02月25日 11:37:16 +01:00

How to add a new event

  1. add new models to data/models.json
    • add the datasheets to datasheets/
  2. add all products to a new event-file data/events/<eventname>.json
    • add product photos to images/
  3. (optional) add a custom theme to style/<eventname>.css
    • for further information see style/example_event.css

Build project

Generate static files

uv sync
./build.sh

Manage translations in locales/

To search for new translation strings in the templates run

uv run pybabel extract -F babel.cfg -o locales/messages.pot .
uv run pybabel update -i locales/messages.pot -d locales

To compile the translation files run

uv run pybabel compile -d locales

Adaptive privacy policy with caddy

The privacy policy page can adapt to the domain it is hosted on, when you enable caddy templating for it. You have to set the variable privacy_mode to one of the following values:

  • main (no proxy, main instance)
  • cname (no proxy, only DNS CNAME delegation)
  • proxy (proxy, traffic comes from another server)

See Caddyfile.example.proxy for an example on how to use this for a proxied domain:

vars privacy_mode "proxy"@privacy path /de/privacy/* /en/privacy/*
handle @privacy {
 root * /srv
 templates
 file_server
}

Tooling

For development and generating useful diffs, a consistent code style is important. That is why we use the following formatters for the specified languages:

  • HTML, CSS, SCSS, JavaScript, JSON: prettier
    • JSON & SCSS with a line length of 120 chars
    • All other files: default settings
  • Jinja2 Templates: djLint
    • uv run djlint ./templates/ --extension=html.j2 --reformat
  • Python: black
    • Default settings
    • We decided to keep the default 88 chars per line instead of PEP8's 79

To compile SCSS into CSS we use dart-sass in its default settings (that is, expanded style) based on the prettier-formatted SCSS file.