From 0f382076a28ccc0293faa9e0d0b579469992a436 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Thu, 25 May 2017 14:31:58 +0200 Subject: [PATCH] Add a README and cut a 1.0 release. Signed-off-by: Thomas Hochstein --- _doc/dejure/CHANGELOG.md | 7 ++++++ _doc/dejure/README.md | 53 ++++++++++++++++++++++++++++++++++++++++ lib/filters/dejure.rb | 2 +- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 _doc/dejure/README.md diff --git a/_doc/dejure/CHANGELOG.md b/_doc/dejure/CHANGELOG.md index dbb3302..99007fb 100644 --- a/_doc/dejure/CHANGELOG.md +++ b/_doc/dejure/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog for nanoc-dejure +## 1.x branch + +### Version 1.0 (2017-05-25) + +* Relase version 1.0. +* Add a README file. + ## 0.x branch ### Version 0.3 (2017-05-25) diff --git a/_doc/dejure/README.md b/_doc/dejure/README.md new file mode 100644 index 0000000..f3da1bf --- /dev/null +++ b/_doc/dejure/README.md @@ -0,0 +1,53 @@ +# nanoc-dejure + +*nanoc* filter implementation of the *dejure.org* +[legal integration service](https://dejure.org/vernetzung.html), +adapted from the PHP reference implementation +at . + +This *nanoc* filter will add links to any references of German +(federal) law or jurisprudence to the corresponding bill or statute +or the appropriate case at the *dejure.org* legal information +service, using the public API of the legal integration service offered +by *dejure.org*. Results will be cached for (by default) 7 days to +reduce *nanoc* runtime. + +## Installation / Usage + +Just drop the `dejure.rb` file into your `lib/filters/` directory and +add the filter to a `compile` rule in your `Rules` file. + +Please set the `base_url` of your site in the *nanoc.yaml* +configuration file, by adding e.g. `base_url: http://mysite.example` +at the end of the file. This is used as a service identification tag +when using the API. + +The filter will use the `tmp/dejure-org/` directory for its cache. + +Adding `` somewhere in a source file will disable +the filter for that file. + +## Parameters + +This filter accepts the following parameters: + +* `format` (`weit` or `schmal`, Default: `weit`) + Small (*schmal*) format will add the link just to the number of the + article or section; wide (*weit*) format will add the link to the + whole reference: "**§ 35** Abs. 1 StVO" or "**§ 35 Abs. 1 StVO**". + +* `buzer` (`0` or `1`, Default: `1`) + If set to `true` (`1`) references to regulations not present at + *dejure.org* will get a link to the *buzer.de* legal information + service, covering all of the German Federal Law. + +* `target` (Default: `''`) + Add this to the `target` attribute of the `` elements that are + generated by the API, e.g. ``. + +* `class` (Default: `''`) + Add this to the `class` attribute of the `` elements that are + generated by the API, e.g. ``. + +* `cache_days` (Default: `7`) + The cache validity (in days). diff --git a/lib/filters/dejure.rb b/lib/filters/dejure.rb index fa325e0..9b7ee48 100644 --- a/lib/filters/dejure.rb +++ b/lib/filters/dejure.rb @@ -41,7 +41,7 @@ module Nanoc::Filters identifier :dejure type :text - VERSION = '0.3' + VERSION = '1.0' CACHEDIR = 'tmp/dejure-org' CACHEDAYS = 7