WordPresser extension released
People who run CKAN-powered websites often want to extend the powerful publishing, auditing and harvesting features of CKAN with Content Management features. For example, it’s common to want to create and edit help pages, background info, and news sections.
Rather than reinvent the wheel and build a CMS within CKAN, we’ve decided to explore how we can seamlessly integrate with existing CMSes, with the minimum of fuss.
- Install the extension like any other extension, i.e. $ pip install -e hg+https://bitbucket.org/sebbacon/ckanext-wordpresser#package=/ckanext-wordpresser
- Set up a WordPress site (e.g. at wordpress.com) and add a Page or two to the primary navigation (I suggest using WordPress 3’s new menus feature)
- Edit your development.ini config file (or production ini file, of course) with something like:
wordpresser.proxy_host = http://<yoursite>.wordpress.com/
- The pages that you added to WordPress will appear in your CKAN instance, appended to the main navigation
The screenshots below show how it works in practice. The smaller shot at the bottom left is a page as it appears in the WordPress blog; the main shot is of a CKAN instance, with the same page embedded and themed according to the main CKAN theme. Note how the WordPress navigation has been appended to the CKAN navigation:
This solution works really well, because:
- the site’s theming, whether of a CKAN package or a WordPress blog post, is done entirely in one place (namely the CKAN css)
- you get all WordPress’s features, like comments, blogs, and rich media plugins
- you keep all the rich functionality provided by CKAN, such as package editing, faceted searching, or statistics about your datasets
- you continue to benefit from upgrades to both systems
The latter point is important: the alternative, using the CKAN API to create your own custom frontend, gives you lots of power over its presentation, but means it’s hard integrate new CKAN features as they are released.
The software is still in alpha version, and there are several improvements we’d like to make — especially providing user account integration between CKAN and WordPress (so that blog comments and package edits are linked to the same user accounts). We’d also like to make some simple WordPress widgets for displaying comment panel like “latest data” and “common tags”, so people can easily construct custom home pages for their sites.
If you’d like to try the software out, drop us a line on the ckan-discuss mailing list, and we’ll answer any questions you might have about installation.