OARepo Theme
SemanticUI theme overlay for InvenioRDM based NRP repositories.
Overview
This package provides a customized Semantic UI theme configuration for Invenio applications, specifically designed to integrate with OARepo repositories. It extends the default Invenio-App-RDM theme with custom styling capabilities and supports integration with multiple OARepo UI packages.
Installation
pip install oarepo-theme
Requirements
- Python 3.14+
- InvenioRDM v14.x
- OARepo v14.x
Key Features
1. Webpack Theme Bundle Integration
Source: oarepo_theme/webpack.py
The package provides a WebpackThemeBundle that integrates with Invenio's asset management system.
Key capabilities:
- Webpack bundle configuration for Semantic UI assets
- Path aliases for Less/CSS customization
- Integration with Invenio's asset compilation pipeline
- Support for custom theme overrides
2. Theme Configuration
Source: oarepo_theme/assets/semantic-ui/less/theme.config
Centralized theme configuration that sets Semantic UI component themes:
/* Global */
@site : 'rdm';
@reset : 'default';
/* Elements */
@button : 'rdm';
@container : 'rdm';
@header : 'rdm';
@input : 'rdm';
@label : 'rdm';
/* ... and more */
The configuration specifies which theme variant to use for each Semantic UI component, defaulting to the 'rdm' theme from Invenio-App-RDM.
3. Theme Override Order
Docs: https://nrp-cz.github.io/docs/customize/repository_ui/branding/theme#theme-hierarchy
Theme uses the SemanticUI theme layering system that supports multiple customization layers. Loading order (from lowest to highest priority):
- Default Semantic UI theme
- Invenio-theme
- Invenio-App-RDM theme
- OARepo package themes (oarepo_theme, oarepo_ui, oarepo_vocabularies_ui, etc.)
- Site-specific overrides & custom component variables
Supported OARepo packages:
oarepo_ui- Core UI componentsoarepo_vocabularies_ui- Vocabulary management UIoarepo_communities- Community features
Each package can provide:
- Component variables (
.variablesfiles) - Style overrides (
.overridesfiles) - Custom SemanticUI (LESS) components
On top of that, site specific style customizations can be made.
4. Webpack Aliases
This theme bundle configures the following Webpack aliases for easy asset referencing:
| Alias | Target | Purpose |
|---|---|---|
../../theme.config$ |
less/theme.config |
Main theme configuration file |
../../less/site |
less/site |
Site-specific styles & overrides |
../../less |
less |
Less source directory |
@less |
less |
Less imports shorthand pointing to correct less sources |
themes/oarepo |
less/oarepo |
OARepo theme directory |
Development
Setup
# Clone repository
git clone https://github.com/oarepo/oarepo-theme.git
cd oarepo-theme
./run.sh venv
Running Tests
./run.sh test
Or run specific test file:
./run.sh test tests/test_webpack.py -s
The package includes tests that verify:
- Webpack alias configuration
- Theme bundle registration
- Asset directory paths
- Entry point loading
See tests/test_webpack.py for examples.
Usage in NRP repositories
Runtime usage
When you generate a new NRP repository based on InvenioRDM, the theme is automatically installed and registered for use via Invenio entry points
[project.entry-points."invenio_assets.webpack"]
oarepo_theme = "oarepo_theme.webpack:theme"
No additional configuration is needed - the theme will be available after installation.
Usage in tests
This theme package can be also used for front-end development & tests (Storybook), so that the tested UI shares the same styles as in the runtime.
When developing a UI-oriented library, include a dependency to your tests package extras:
#pyproject.toml
tests = [
"pytest>=7.1.2",
"oarepo-theme>=1.0.0dev1,<2.0.0",
# ...
]
Then you can set-up Storybook tests to use this theme package:
./run.sh jstest setup --with-storybook
Customizing the Theme
To customize the theme in your application:
-
Override variables: Create files in your app's
/assets/less/directory:/* assets/less/globals/site.variables */ @primaryColor: #2185d0; @linkColor: #4183c4;
-
Add custom styles: Create override files:
/* assets/less/elements/button.overrides */ .ui.button { border-radius: 4px; }
For more in-depth guide to theme customization, please refer to the official Theme Customization Docs.
Entry Points
The package registers the following Invenio entry point:
[project.entry-points."invenio_assets.webpack"]
oarepo_theme = "oarepo_theme.webpack:theme"
This entry point is automatically discovered by Invenio and makes the theme available to the asset compilation system.
License
Copyright (c) 2025 CESNET z.s.p.o.
OARepo Theme is free software; you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE file for more details.
Links
- Documentation: https://github.com/oarepo/oarepo-theme
- PyPI: https://pypi.org/project/oarepo-theme/
- Issues: https://github.com/oarepo/oarepo-theme/issues
- NRP Invenio Docs: https://nrp-cz.github.io/docs/
Acknowledgments
This project builds upon Invenio Framework and Semantic UI, and is developed as part of the NRP-CZ ecosystem.
Metadata
Release files for oarepo-theme 7.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| oarepo_theme-7.0.0.tar.gz | 8.8 kB | Without provenance | Details for oarepo_theme-7.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oarepo_theme-7.0.0-py3-none-any.whl | Python 3 | none | any | Details for oarepo_theme-7.0.0-py3-none-any.whl |
Total release size: 16.7 kB
Release files / oarepo_theme-7.0.0.tar.gz
| Download URL | oarepo_theme-7.0.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85cd8236975e235c782f28a94d3da5ff9a8ef11538acbbdf6978ec39b475b121
|
|
BLAKE2b-256 checksum How to use checksums |
8974b98ff4187400e2929abdabd1b585bc765c1f0022f3c14f0d1c051dfcdd08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / oarepo_theme-7.0.0-py3-none-any.whl
| Download URL | oarepo_theme-7.0.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebeb660dfbe45b111dfecd7cbb98b03ca9d27a69efec4187212aa908ef4822ff
|
|
BLAKE2b-256 checksum How to use checksums |
88214f8d24b0ecb1995420888b2af15e9a51461020cfcbcc7b8447302b2580c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for oarepo-theme 7.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.