A CKAN extension that helps people cite your datasets correctly
Many licenses used for open data require some kind of attribution when the data is used. However, users often don't know how exactly that should be done.
This extension gives users ready-to-use attribution texts that they can simply copy and paste. The texts are automatically adapted to the dataset, its license and the publishing organization.
ckanext-citehelp was updated and tested with CKAN 2.11.
This is the default attribution text, shown on dataset and resource pages:
Dataset "Awesome Weather Data", Funky Weather Team (https://funky-weather.org). Published under the license "Great Weather License" (https://weather-license.com). See https://my-ckan-instance.com/dataset/65571194-1b1a-4ce1-b169-15942647208c.
In addition to the plain text, a HTML variant is shown which uses links instead of listing the URLs verbatim.
The dataset title, the name and URL of the publishing organization, the license
title and the license URL are automatically adapted for the current dataset.
Organizations can provide a custom URL in an extra
field named url
,
otherwise the link of their CKAN page is used.
There are multiple ways to customize the attribution text.
The first is to override the corresponding blocks in the template
ckanext-citehelp/snippets/citehelp.html
, in particular the blocks
citehelp_template_text
and citehelp_template_html
. See
CKAN's template documentation for more information on overriding templates.
Make sure to wrap the texts in {% trans %}
blocks (as in the original
template) so that they are translatable.
The second possibility is to provide custom translations. Both the plain text and the HTML text are marked as translatable and can therefore be translated using CKAN's translation infrastructure.
Copyright (C) 2025 Stadt Karlsruhe (www.karlsruhe.de)
Distributed un der the GNU Affero General Public License. See the file
LICENSE
for details.