aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-09-10 16:26:26 +0200
committerMichał Górny <mgorny@gentoo.org>2017-10-12 22:47:59 +0200
commit92a6897890be185d12c898320e98abc1d7637a1f (patch)
treec3eeb1a30d52d833b14f583a3f479bbf4dae2174 /_plugins
parentinside-gentoo: Fix link to GLEPs (diff)
downloadwww-92a6897890be185d12c898320e98abc1d7637a1f.tar.gz
www-92a6897890be185d12c898320e98abc1d7637a1f.tar.bz2
www-92a6897890be185d12c898320e98abc1d7637a1f.zip
glep: Include full metadata on top
Diffstat (limited to '_plugins')
-rw-r--r--_plugins/gleps.rb26
1 files changed, 21 insertions, 5 deletions
diff --git a/_plugins/gleps.rb b/_plugins/gleps.rb
index a9a1455..79ac6a2 100644
--- a/_plugins/gleps.rb
+++ b/_plugins/gleps.rb
@@ -32,7 +32,7 @@ module Gentoo
read_yaml(File.join(@base, GLEPGenerator::GLEP_DIR), name)
data['permalink'] = "/glep/#{@name}"
- data['layout'] = 'page'
+ data['layout'] = 'glep'
data['nav1'] = 'inside-gentoo'
data['nav2'] = 'gleps'
@@ -42,26 +42,42 @@ module Gentoo
@number = $1.to_i if line =~ /^GLEP: (.*)$/
@title = $1 if line =~ /^Title: (.*)$/
@version = $1 if line =~ /^Version: (.*)$/
- @date = $1 if line =~ /^Last-Modified: (.*)$/
+ @lastmodified = $1 if line =~ /^Last-Modified: (.*)$/
@author = $1 if line =~ /^Author: (.*)$/
+ @discussionsto = $1 if line =~ /^Discussions-To: (.*)$/
@status = $1 if line =~ /^Status: (.*)$/
@type = $1 if line =~ /^Type: (.*)$/
@contenttype = $1 if line =~ /^Content-Type: (.*)$/
+ @requires = $1 if line =~ /^Requires: (.*)$/
@created = $1 if line =~ /^Created: (.*)$/
@posthistory = $1 if line =~ /^Post-History: (.*)$/
+ @replaces = $1 if line =~ /^Replaces: (.*)$/
+ @replacedby = $1 if line =~ /^Replaced-By: (.*)$/
break if line.chomp.empty?
end
@content = RbST.new(lines.join('')).to_html
- site.data['gleps'] << {
+ glep_data = {
'number' => @number,
'title' => @title,
+ 'version' => @version,
+ 'lastmodified' => @lastmodified,
+ 'author' => @author,
+ 'discussionsto' => @discussionsto,
'status' => @status,
'type' => @type,
- 'url' => data['permalink']
+ 'contenttype' => @contenttype,
+ 'requires' => @requires,
+ 'created' => @created,
+ 'posthistory' => @posthistory,
+ 'replaces' => @replaces,
+ 'replacedby' => @replacedby,
}
- data['title'] = @title
+ data.update(glep_data)
+ site.data['gleps'] << glep_data.merge({
+ 'url' => data['permalink']
+ })
end
end
end