From 33e81fa9c6842c0f99d044db03664e6dcd755335 Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Mon, 16 May 2016 19:27:30 -0700 Subject: [PATCH] old version of OD link to current version Fixes #79 English only for now (match /en/) pending #54 --- _config.yml | 2 +- _layouts/default.html | 6 +++++- css/style.css | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 060f9c7..11658f0 100644 --- a/_config.yml +++ b/_config.yml @@ -4,7 +4,7 @@ googleanalytics: UA-8271754-4 github: http://github.com/okfn/opendefinition url: http://opendefinition.org permalink: /:year/:month/:day/:title/ -od_current_version: 2.1 +od_current_version: '2.1' gems: - jekyll-sitemap diff --git a/_layouts/default.html b/_layouts/default.html index b5071d2..69b9670 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -2,7 +2,7 @@ - + <title> {{page.title}} - {{site.title}} - Defining Open in Open Data, Open Content and Open Knowledge @@ -66,6 +66,10 @@ {% endif %}
+ {% assign url_elements = page.url | split:"/" %} + {% if url_elements[-3] == "od" and url_elements[-2] < site.od_current_version and url_elements[-1] == "en" %} +
A newer version of the Open Definition is available.
+ {% endif %} {% if page.notitle != true %}