This is the main theme plugin for UKDS CKAN instance. It includes display control on the CKAN to ensure UKDS Theme is applied and blockage of some functionality from frontend rendering.
- Footer style with ESRC logo
- Favicon handling
- Front page background handling
- Blockage of Activity Stream access for normal site visitor
- Fix for template issue on CKAN No. 6931
- "Machine-readable data" section in the dataset page. Only visible when DCAT extension is installed.
This plugin is developed and tested on CKAN version 2.9
Compatibility with core CKAN versions:
CKAN version | Compatible? |
---|---|
2.6 and earlier | no |
2.7 | no |
2.8 | not tested |
2.9 | yes |
To install ckanext-ukdstheme:
- Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
- Clone the source and install it on the virtualenv
cd /usr/lib/ckan/default/src
sudo git clone https://github.com/JiscSD/ckanext-ukdstheme.git
cd ckanext-ukdstheme
pip install -e .
pip install -r requirements.txt
then reset the permissions for the new ckanext-ukdstheme directory to 'ckan'
-
Add
ukdstheme
to theckan.plugins
setting 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 reload
or if the server is on AWS, called
sudo reboot now
To update ckanext-ukdstheme:
- Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
- pull the latest version then install it on the virtualenv
cd /usr/lib/ckan/default/src/ckanext-ukdstheme
sudo git pull
pip install -e .
pip install -r requirements.txt
then reset the permissions for the ckanext-ukdstheme directory to 'ckan'
- Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
or if the server is on AWS, called
sudo reboot now
None at present
To install ckanext-ukdstheme for development, activate your CKAN virtualenv and do:
git clone https://github.com/JiscSD/ckanext-ukdstheme.git
cd ckanext-ukdstheme
python setup.py develop
pip install -r dev-requirements.txt
To run the tests, do:
pytest --ckan-ini=test.ini
If ckanext-ukdstheme should be available on PyPI you can follow these steps to publish a new version:
-
Update the version number in the
setup.py
file. See PEP 440 for how to choose version numbers. -
Make sure you have the latest version of necessary packages:
pip install --upgrade setuptools wheel twine
-
Create a source and binary distributions of the new version:
python setup.py sdist bdist_wheel && twine check dist/*
Fix any errors you get.
-
Upload the source distribution to PyPI:
twine upload dist/*
-
Commit any outstanding changes:
git commit -a git push
-
Tag the new release of the project on GitHub with the version number from the
setup.py
file. For example if the version number insetup.py
is 0.0.1 then do:git tag 0.0.1 git push --tags