Release nanoc-dejure 0.3
Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
77cd2e21b4
commit
4f2e77abf9
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
## 0.x branch
|
## 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.
|
* Save space by caching just '<!-- idem -->' for unchanged texts.
|
||||||
* Change protocol to https.
|
* Change protocol to https.
|
||||||
* Make cache validity configurable.
|
* Make cache validity configurable.
|
||||||
|
|
|
@ -41,7 +41,7 @@ module Nanoc::Filters
|
||||||
identifier :dejure
|
identifier :dejure
|
||||||
type :text
|
type :text
|
||||||
|
|
||||||
VERSION = '0.3-beta'
|
VERSION = '0.3'
|
||||||
CACHEDIR = 'tmp/dejure-org'
|
CACHEDIR = 'tmp/dejure-org'
|
||||||
CACHEDAYS = 7
|
CACHEDAYS = 7
|
||||||
|
|
||||||
|
@ -50,6 +50,8 @@ module Nanoc::Filters
|
||||||
# nothing to replace
|
# nothing to replace
|
||||||
return input
|
return input
|
||||||
end
|
end
|
||||||
|
# return if input contains '<!-- no-dejure -->'
|
||||||
|
return input if (/<!-- ?no-?dejure ?-->/ =~ input)
|
||||||
# set cache validity in days from params or set a default
|
# set cache validity in days from params or set a default
|
||||||
cache_days = params.delete(:cache_days)
|
cache_days = params.delete(:cache_days)
|
||||||
if cache_days.nil?
|
if cache_days.nil?
|
||||||
|
|
Loading…
Reference in a new issue