Release nanoc-dejure 0.3

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Thomas Hochstein 2017-05-25 13:52:13 +02:00
parent 77cd2e21b4
commit 4f2e77abf9
2 changed files with 5 additions and 2 deletions

View file

@ -2,8 +2,9 @@
## 0.x branch
### Version 0.3 (unreleased)
### Version 0.3 (2017-05-25)
* Enable opt-out by adding '<!-- no-dejure -->' somewhere on the page.
* Save space by caching just '<!-- idem -->' for unchanged texts.
* Change protocol to https.
* Make cache validity configurable.

View file

@ -41,7 +41,7 @@ module Nanoc::Filters
identifier :dejure
type :text
VERSION = '0.3-beta'
VERSION = '0.3'
CACHEDIR = 'tmp/dejure-org'
CACHEDAYS = 7
@ -50,6 +50,8 @@ module Nanoc::Filters
# nothing to replace
return input
end
# return if input contains '<!-- no-dejure -->'
return input if (/<!-- ?no-?dejure ?-->/ =~ input)
# set cache validity in days from params or set a default
cache_days = params.delete(:cache_days)
if cache_days.nil?