diff --git a/lib/jekyll/geolexica/filters.rb b/lib/jekyll/geolexica/filters.rb index db8181c..af9148f 100644 --- a/lib/jekyll/geolexica/filters.rb +++ b/lib/jekyll/geolexica/filters.rb @@ -25,7 +25,7 @@ def display_authoritative_source(input) modification = input["modification"] return source unless modification - "#{source}, modified -- #{modification}" + "#{source}, #{input["status"] || "modified"} -- #{modification}" end def concepts_url(base_url) diff --git a/lib/jekyll/geolexica/glossary.rb b/lib/jekyll/geolexica/glossary.rb index 083c333..9bcc6bb 100644 --- a/lib/jekyll/geolexica/glossary.rb +++ b/lib/jekyll/geolexica/glossary.rb @@ -83,14 +83,21 @@ def normalize_sources(concept) concept['sources'] ||= [] authoritative_sources.each do |authoritative_source| + if authoritative_source['relationship'] + status = authoritative_source['relationship']['type'] + modification = authoritative_source['relationship']['modification'] + end + concept['sources'] << { + "status" => status, + "modification" => modification, "origin" => { 'ref' => authoritative_source['ref'], 'clause' => authoritative_source['clause'], 'link' => authoritative_source['link'], }.compact, 'type' => 'authoritative' - } + }.compact end end