diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-07-23 12:36:33 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-07-23 12:36:33 +0200 |
commit | e3a91a873d5a1315fb10e5abd9a4a2c8e0caa46a (patch) | |
tree | a07ea7f133663f5d5d9c485e425b6ea28b12e3c0 /_plugins/gleps.rb | |
parent | gitignore: Ignore _data/service-keys.gpg (diff) | |
download | www-e3a91a873d5a1315fb10e5abd9a4a2c8e0caa46a.tar.gz www-e3a91a873d5a1315fb10e5abd9a4a2c8e0caa46a.tar.bz2 www-e3a91a873d5a1315fb10e5abd9a4a2c8e0caa46a.zip |
gleps: Handle disjoint source and destination filename cleaner
Diffstat (limited to '_plugins/gleps.rb')
-rw-r--r-- | _plugins/gleps.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/_plugins/gleps.rb b/_plugins/gleps.rb index 2fa9753..28e1fa7 100644 --- a/_plugins/gleps.rb +++ b/_plugins/gleps.rb @@ -26,13 +26,13 @@ module Gentoo @site = site @base = @site.source @dir = GLEPGenerator::GLEP_DIR - @name = "#{name.chomp('.rst')}.html" + @name = name process(@name) read_yaml(File.join(@base, GLEPGenerator::GLEP_DIR), name) data['title'] = "GLEP #{data['GLEP']}: #{data['Title']}" - data['permalink'] = "/glep/#{@name}" + data['permalink'] = "/glep/#{@name.chomp('.rst')}.html" data['source'] = name data['layout'] = 'glep' data['nav1'] = 'inside-gentoo' @@ -56,5 +56,13 @@ module Gentoo 'url' => data['permalink'] }) end + + def output_ext + '.html' + end + + def destination(dest) + return super.sub('.rst', '') + end end end |