Galette

Galette Theme

GitHub Pages theme for Galette plugins

Maintained by the Galette team

The GitHub Pages theme for Galette plugin websites. It carries the same identity as galette.eu — PT Sans, the orange #ffb619, the blue #007baa and the grey band behind the logo — and it states, on every page, whether the plugin is maintained by the Galette team or by a community member.

See the element reference for how content is rendered.

Using it

Add this to the _config.yml on your plugin’s gh-pages branch:

remote_theme: galette/theme-ghpages
title: Galette Fullcard
description: Full member card as PDF
maintainer: core            # core | community
plugin:
  archive: galette-plugin-fullcard
  version: "2.2.1"
  min_galette: "1.3.0"
defaults:
  - scope: {path: ""}
    values: {layout: default}

Then make sure GitHub Pages is set to build from the gh-pages branch, root directory. Nothing else is needed: no workflow, and no _layouts of your own — a local _layouts/default.html would shadow the theme’s.

Key Required What it does
title yes Plugin name, shown as the page heading
description yes Tagline under the heading, and the meta description. A page may override it with its own description front matter — that is how a translated page gets a translated tagline.
maintainer yes core shows a “Maintained by the Galette team” pill outlined in Galette orange with an outlined star, community a “Community plugin” one outlined in grey with a group icon. Anything else is treated as community.
tracker_url no Bug tracker in the menu, defaults to the repository’s GitHub issues
default_lang no Language the menu falls back to when a page has no translation, defaults to en
author no Name in the copyright line, defaults to Johan Cwiklinski
galette_url no Overrides the logo target
galette_doc_url no Overrides the “Galette documentation” menu entry
galette_contact_url no Overrides the “Get in touch” target

The source repository link comes from site.github.*, so it needs no configuration.

The menu and the download cartouche

Two distinct things, and they are not interchangeable: the menu is the sidebar list on the right, the cartouche is the orange box in the header.

The menu lists the site’s own pages first, then the bug tracker and the source repository, then a Galette block. On a small screen it folds into an off-canvas panel driven by :target, so it works without JavaScript.

The download cartouche points at wherever the plugin’s archives actually live — releases on GitHub, nightly builds on galette.eu:

Key Required What it does
plugin.archive no Archive base name. With plugin.version it builds both URLs on galette.eu: {archive}-{version}.tar.bz2 and {archive}-dev.tar.bz2.
plugin.version no Version shown on the stable button, latest when absent
plugin.min_galette no Fallback for the compatibility pill, shown without a verdict. Only for a plugin whose releases are still published by hand — otherwise the value is read from _define.php, see below.
plugin.release_url no Overrides the derived stable URL; falls back to the repository’s releases/latest
plugin.nightly_url no Overrides the derived nightly URL
plugin.name no Label on both buttons, defaults to title
galette_download_url no Base the two URLs are built on, defaults to https://galette.eu/download/plugins

The whole cartouche disappears when a site declares no download at all.

The compatibility pill

Under each download link sits the Galette generation that build targets, and — for the stable one — whether it is the Galette anyone would install today:

The verdict compares two values, and neither is maintained by hand:

Where What Written by
_data/galette.yml, on this site’s Pages branch compver from _define.php at the tag of releases/latest galette/.github/actions/release-plugin, at each release
_includes/galette-version.html, in the theme GALETTE_COMPAT_VERSION of Galette’s own latest release this repository’s Refresh the Galette version workflow, daily

Being in the theme, the second one reaches every site through remote_theme, so a new Galette release flips the verdict on all of them without any plugin releasing anything. compver is a generation, not an open floor: Galette\Core\Plugins::register() disables a plugin whose compver is lower than the running Galette’s GALETTE_COMPAT_VERSION, and imposes no upper bound.

Galette plugin releases live on galette.eu rather than on GitHub — plugin-fullcard has no GitHub release at all — so declaring archive and version is the normal way, and the version then lives in exactly one place.

The version and the minimum Galette version belong here and nowhere else: a number written into a page becomes a string a translator has to carry, in every language, and has to be bumped in each of them at every release.

Pages and languages

A page’s front matter carries only what a reader sees:

---
title: Documentation
description: Full member card as PDF
---

Everything structural is derived: the language is the first path segment when that segment is a language the theme knows, and translations of a page are the pages sharing its file name.

index.md               -> /                      en
documentation.md       -> /documentation.html     en
fr/index.md            -> /fr/                    fr, paired with index.md
fr/documentation.md    -> /fr/documentation.html  fr, paired with documentation.md

A site therefore needs no defaults beyond the layout, and a translation added later appears on its own. Do not put lang in defaults — it would override the derivation for every page — and never set permalink on a translated page, since the URL is what carries the language.

There is deliberately no identifier in the front matter: with Weblate’s Translate front matter values enabled, one would be handed to translators and flagged on every language. The menu finds the home and documentation pages by file name, index.md and documentation.md, or by an explicit ref of home or doc for a site that names them otherwise.

Adding a language to the interface

The theme knows the nineteen languages Galette translates into — the list shared with the core, the manual and every plugin, on Weblate.

Interface strings — the menu labels, the maintainer sentences, the cartouche, the footer — live in i18n/strings/<lang>.yml in the theme repository, which is what Weblate translates; bin/build-i18n turns them into the _includes the theme actually ships. Ten languages have their own strings today, the nine others render the English ones while still declaring their own language and text direction.

Right-to-left languages get dir="rtl", Galette’s mirrored header photo, and a layout built on logical properties.

Publishing a language on your own site is independent of that: add its defaults entry and the pages, and the selector picks it up.

The eight strings the menu and the cartouche need are part of that set, so a new language means one when branch in each of the two includes.

Licence

The theme is GPL-3.0-or-later, like the galette.eu stylesheets it derives from. Site contents are expected to be CC BY-SA 4.0, as stated in the footer.