Skip to content

Repository files navigation

PyData Roma Capitale -- website

Static site powered by Pelican, deployed on GitHub Pages.


Repo layout

Path What it contains
content/ Markdown/ReST pages plus meet-up stubs auto-generated by the meetup_events plug-in
plugins/ Custom Pelican plug-ins (currently only the Meetup sync)
themes/roma/ Bootstrap 5.3 theme tailored to PyData Roma colours
pelicanconf.py Dev config -- relative links
publishconf.py Prod config -- absolute links pointing at the production domain
.github/workflows/ CI pipeline that builds + deploys on every push to main

Environment

# Python >= 3.11 required
# Install uv (https://docs.astral.sh/uv/getting-started/installation/)

uv sync

uv sync creates the virtual environment and installs all dependencies defined in pyproject.toml automatically.


Local workflow

1. Fast dev server

uv run pelican --listen --autoreload --settings pelicanconf.py -p 8001
# open http://localhost:8001/

Uses relative URLs so everything renders correctly on localhost.

2. Production build preview

uv run pelican content --settings publishconf.py --output output
python -m http.server --directory output 8002
# open http://localhost:8002/

publishconf.py writes absolute URLs rooted at https://pydataroma.python.it.


Meetup event auto-sync

On every build the meetup_events plug-in:

  1. Fetches the public iCal feed of the PyData Roma Capitale Meetup group.
  2. Creates/updates one Markdown file per future event under content/events/, containing the title, date, and an RSVP link.
  3. Deletes stubs for past events.

This keeps the homepage "Upcoming events" card in sync with the actual Meetup schedule with zero manual work.

If the Meetup feed is unreachable (e.g. no network), the build proceeds gracefully with a warning.


Adding social links

Social links are defined in pelicanconf.py as a list of 3-tuples:

SOCIAL = [
    ("Name", "https://url", "bi bi-icon-class"),
    # ...
]

The third element is a Bootstrap Icons class. For the Meetup icon (which uses a custom SVG), use the special value "meetup".


CI / GitHub Pages deploy

The workflow .github/workflows/deploy.yml runs on every push to main:

steps:
  - uses: actions/checkout@v4
  - uses: astral-sh/setup-uv@v5
  - uses: actions/setup-python@v5
    with:
      python-version: "3.11"
  - run: uv sync
  - run: uv run pelican content --settings publishconf.py --output output
  - uses: peaceiris/actions-gh-pages@v4
    with:
      publish_dir: output
      cname: pydataroma.python.it

The first run creates the gh-pages branch. GitHub Pages serves from that branch. Links work because publishconf.py's SITEURL matches the final address.


Contributing

  • Fix a typo? Open a quick PR.
  • Hack on the theme? Tweak the CSS/JS in themes/roma/static/.

All contributions must respect the PyData Code of Conduct.


License

Code, themes and docs are released under the MIT License (see LICENSE). Images may have separate licences; check individual files before reuse.

Contributors

Languages