Skip to main content

Invenio extension for community themes

Project description

Definitions and assets for themed communities at TU Wien.

The themed communities feature in InvenioRDM

Since version 13, InvenioRDM allows communities to be themed.

Under the hood, it works by registering the CommunityThemeJinjaLoader for community view functions. This is a custom Jinja template loader that renders alternative templates from a directory based on the community’s theme brand. If either of the templates involved in the rendering chain doesn’t have such an override, the “normal” template will be rendered instead. Thus, it is possible to selectively override any Jinja template involved in the rendering of a community by simply placing the desired templates in the correct path (with a themes/${BRAND}/ prefix).

For instance, the standard header template for communities is located under templates/semantic-ui/invenio_communities/details/header.html. If one wants to provide a custom template for a community with the meretneith brand, it would be placed under: templates/themes/meretneith/invenio_communities/details/header.html (the semantic-ui part can be omitted).

The theme for a community (including the brand and a limited set of custom style) can be set via the invenio shell REPL, with code snippets described in the InvenioRDM documentation, or below.

If Jinja template overrides and the limited styling is enough, then adding the templates to the InvenioRDM project definition will be sufficient. However, if extra CSS styling or custom JS is required, then it will become necessary to use mechanisms only available to extensions like this one here, or the project’s local site/ package.

Provided community themes

The following community themes are provided by this package:

Meret Neith

The Meret Neith community holds datasets from excavations of the tomb of the Egyptian queen from whom the community gets its name. Thus, the community’s theme is inspired by Egypt and desert.

We have instantiated the community theme’s style into the custom CSS that gets loaded by the base template. As such, the style key can be omitted when setting the community’s theme:

from invenio_communities.proxies import current_communities
from invenio_access.permissions import system_identity

service = current_communities.service
meretneith = service.read(system_identity, "meretneith")
meretneith_theme = {
  "theme": {
     "brand": "meretneith",
     "enabled": True,
  }
}

service.update(system_identity, "meretneith", {**meretneith.data, **meretneith_theme})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invenio_community_themes_tuw-2026.0.0.tar.gz (473.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

invenio_community_themes_tuw-2026.0.0-py3-none-any.whl (470.5 kB view details)

Uploaded Python 3

File details

Details for the file invenio_community_themes_tuw-2026.0.0.tar.gz.

File metadata

File hashes

Hashes for invenio_community_themes_tuw-2026.0.0.tar.gz
Algorithm Hash digest
SHA256 60ecee186faea1443fa52bd029965665ed25b0cb41d8a34dce4c6f88345b7ea6
MD5 433d37f44dea9e95157f4ec38c576518
BLAKE2b-256 8c706c60eebab134f8300573a67f256a5a1b109d24639d9208652b9b9706da18

See more details on using hashes here.

File details

Details for the file invenio_community_themes_tuw-2026.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for invenio_community_themes_tuw-2026.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c44cf127f903efb3a080214b38c10c40deede330f2269ca437cdd7afd63e5f7c
MD5 8d9b271a6f39d047d2754cfa8ff9f664
BLAKE2b-256 615890f7f5452d55dafe053ee260f052b3ce10f4f5db95514375bfa8265cb8e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page