Guidelines for any LLM working on this repo.
- Pelican-powered static site for PyAmsterdam (reStructuredText content, custom Jinja templates).
- Domains:
py.amsterdam(CNAME shipped in build) published via GitHub Pages.
- Content:
content/(events in year foldersYYYY/, pages incontent/pages/, shared images incontent/images/). - Config:
pelicanconf.pyplus environment variantsconf_prod.py,conf_preview.py,conf_gh_pages.py. - Automation:
Makefile,tasks.py(Invoke tasks). - Theme:
theme/(templates + static assets), vendors undertheme/static/vendor/. - Docs/helpers:
docs/(e.g.,event_template.rst), generated output lives inoutput/(do not commit edits there).
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# alt: uv sync && source .venv/bin/activate- Build local:
make html(orinvoke build) - Serve:
make serveorinvoke reserve(build+serve), live reload:invoke livereload/make devserver - Clean:
make clean - Prod build:
make prod(usesconf_prod.py) - Preview build:
PR_NUMBER=123 make preview(usesconf_preview.py) - GitHub Pages manual publish:
invoke gh-pages(usesconf_gh_pages.py)
- GitHub Actions:
.github/workflows/pelican-gh-pages.ymlbuilds with Python 3.11 (make prod) and deploys to Pages. - Manual:
invoke gh-pagespushesoutput/togh-pagesbranch.
- PEP 8 for Python helpers; comment only when behaviour is non-obvious.
- Events: name files
YYYY/event-name.rst, include:event_type:and:date:(YYYY-MM-DD, add time if needed), add RSVP/external URLs when relevant. - Use reStructuredText; start from
docs/event_template.rstor duplicate a prior event for consistency. - Assets: shared in
content/images/; keep year folders text-only unless the asset is event-specific.
- Run
make html(orinvoke build) before pushing; fix Pelican warnings. - Spot-check rendered pages via
make serveor the generatedoutput/. - When editing theme/JS, test key breakpoints;
invoke livereloadfor fast feedback.
SITEURL,SITEPORT(defaults localhost:8000)TELEGRAM_URL(link on site)CDN(toggle CDN in production configs)PR_NUMBER(needed for preview builds)
- Custom plugins in
plugins/my-plugins/:summary(auto summaries) andtext_generator(plain-text render). Keep them registered inpelicanconf.py. - Jinja filters:
cachebust,by_year,quoteplus,count_to_font_size,chain. - Theme entrypoints:
theme/templates/index.html,theme/templates/article.html,theme/templates/events.html; static JS/CSS intheme/static/.
- Commits: short, present-tense imperative (
update who we are,add mastodon link); keep related edits together. - PRs: summarize changes, link related events/issues, list verification steps (e.g.,
make html), add screenshots for layout changes, ensure clean merge.