A CKAN extension providing the Mat-O-Lab theme for data portals. It includes configurable branding (logo, banner, favicon), GDPR-compliant privacy pages in English and German, and a customisable landing page suitable for materials science research data repositories.
Compatibility with core CKAN versions:
| CKAN version | Compatible? |
|---|---|
| 2.9 and earlier | not tested |
| 2.10 | ✓ CI tested |
| 2.11 | ✓ CI tested |
To install the extension:
- Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate- Use pip to install package
pip install ckanext-matolabtheme-
Add
matolabthemeto theckan.pluginssetting in your CKAN config file (by default the config file is located at/etc/ckan/default/ckan.ini). -
Restart CKAN. For example, if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reloadHeader (banner_top.svg) and footer (banner_bottom.svg) are crisp SVG files —
a teal gradient with flowing sinusoidal wave lines. Upload replacements or set
an external URL via Admin → Theme Config.
On first load the plugin seeds ckan.site_custom_css with a default navy CSS
variable palette (if no custom CSS is already configured):
:root {
--bs-primary: #1a3d5c;
--bs-primary-rgb: 26, 61, 92;
--bs-secondary: #4a7fa5;
--bs-secondary-rgb: 74, 127, 165;
--bs-body-bg: #f0f4f7;
--bs-body-bg-rgb: 240, 244, 247;
}To customise colors go to Admin → Config → Custom CSS and override any CSS variable — no restart required. Clearing the field restores the plugin defaults on the next restart.
CKANINI__CKANEXT__MATOLABTHEME__CONTACT_URL=<url to contact site>
CKANINI__CKANEXT__MATOLABTHEME__LEGAL_PERSON_MD=<Legal Body Address in Markdown>
CKANINI__CKANEXT__MATOLABTHEME__LEGAL_NOTICE_URL=<Url to your legal notice information>
CKANINI__CKANEXT__MATOLABTHEME__DSVGO_CONTACT_MD=<Contact to adress with dsvgo conflicts in markdown>
CKANINI__CKANEXT__MATOLABTHEME__CONTACT_DP_COMMISSIONER_EMAIL_MD="[datenprotection_commissioner@example.de](mailto:datenschutzbeauftragte@example.de?subject=dataprotection ${CKAN_HOST})"
CKANINI__CKAN__FAVICON=/img/favicon.pngor ckan.ini parameters.
ckan.matolabtheme.contact_url = <url to contact site>
ckan.matolabtheme.legal_person_md = <Legal Body Address in Markdown>
ckan.matolabtheme.legal_notice_url = <Url to your legal notice information>
ckan.matolabtheme.dsvgo_contact_md = <Contact to adress with dsvgo conflicts in markdown>
ckan.matolabtheme.dsvgo_contact_md = "[datenprotection_commissioner@example.de](mailto:datenschutzbeauftragte@example.de?subject=dataprotection]"
ckan.favicon = /img/favicon.pngIf no contact_url is given, it will relate to the about page!
To install ckanext-matolabtheme for development, activate your CKAN virtualenv and do:
git clone https://github.com/Mat-O-Lab/ckanext-matolabtheme.git
cd ckanext-matolabtheme
pip install -e ".[dev]"To run the tests, do:
pytest --ckan-ini=test.iniIf you use this software, please cite it. GitHub shows a "Cite this repository" button (top right of the repo page) that exports the CITATION.cff in APA or BibTeX format.
After the first Zenodo release, a DOI-specific BibTeX entry will be available on the Zenodo record. Until then:
@software{hanke_ckanext_matolabtheme,
author = {Hanke, Thomas},
title = {ckanext-matolabtheme},
url = {https://github.com/Mat-O-Lab/ckanext-matolabtheme},
license = {AGPL-3.0-or-later},
}