Theme
This guide explains how theming works in a InvenioRDM-based NRP repository.
NRP repositories rely on a layered theming architecture built on top of Semantic UI, Invenio Themes, and the oarepo-theme package.
Through this system, you can adapt colors, typography, layouts, and styling of UI components to better match the visual identity of your institution.
NRP repositories use the Semantic UI theming system through a layered setup:
oarepo-theme— the NRP theme overlay for NRP repositoriesinvenio-app-rdm— the RDM UI theme for InvenioRDM-based repositoriesinvenio-theme— the core Semantic UI theme for any Invenio applications
NRP theming tries to preserve the default UI elements & look & feel of InvenioRDM, but allows you to extend or override any part of the presentation layer using the mechanisms described below.
Theming Methods
NRP repositories use the standard InvenioRDM theming system. Following methods are available to customize the built-in themes:
If you are unfamiliar with InvenioRDM theming, we recommend reviewing the InvenioRDM Theming Documentation first.
1. Modify Invenio application Configuration
Basic theme-related UI settings can be configured via the Invenio configuration files or environment variables:
- invenio.cfg
- variables
This is a simplest way to change site-wide appearance, for cases where a configuration option is available. For a reference on how to configure these settings, please consult the Configuration docs.
2. Create or Override Asset Files
In NRP repositories (following InvenioRDM conventions), repository-level theming customizations are placed in the project’s top-level assets folder.
Your repository structure will typically contain:
- webpack.py
- invenio.cfg
Customizing the theme when using this method typically involves:
- creating Semantic UI LESS variables (e.g. for colors, fonts, spacing) and using them to override default component styles
- adding or overriding LESS components
- adding custom assets such as images, fonts, or JavaScript files
This structure aligns with the theming approach used in InvenioRDM itself and keeps all visual overrides together at the repository level.
Theme Hierarchy
Invenio applies theming through a layered cascade.
NRP inherits this cascade but adds the oarepo-theme layer as additional wrapper around the RDM base theme.
This wrapper extends the theme with NRP-specific adjustments and components.
Semantic UI Base Theme
The default global theme as provided by Semantic UI package.
Defines the core variables, reset, layout, and standard UI components.
Invenio Theme (invenio-theme)
Extends Semantic UI with basic Invenio defaults for typography, buttons, color palette, layout helpers, header/footer blocks, grid variations.
InvenioRDM UI (invenio-app-rdm)
Adds RDM-specific branding, templates, components, search UI, forms, and deposit interfaces.
Oarepo Theme (NRP base theme)
NRP-specific extension layer over the RDM theme — adjusted defaults for NRP repositories, NRP-specific branding, typography, variable and additional components.
Your Project Branding
Everything placed under assets/less overrides the layers above.
This is where repository-level customization occurs.