Commit a2d22c42 authored by Sylvester Keil's avatar Sylvester Keil

Allow local override of type_order

See #129
parent bac7a87d
......@@ -335,7 +335,7 @@ Feature: Grouping BibTeX Bibliographies
Then I should not see "<h2 class=\"bibliography\">2007</h2>" in "_site/scholar.html"
And I should not see "<h2 class=\"bibliography\">2008</h2>" in "_site/scholar.html"
@tags @grouping @wip
@tags @grouping
Scenario: Local grouping override - grouping by year
Given I have a scholar configuration with:
| key | value |
......
......@@ -93,12 +93,16 @@ module Jekyll
self.group_order = group_order
end
opts.on('-O', '--type_order ORDER') do |type_order|
@group_by = type_order
end
opts.on('-T', '--template TEMPLATE') do |template|
@bibliography_template = template
end
end
argv = arguments.split(/(\B-[cCfqrptTsgGlomA]|\B--(?:cited(_in_order)?|file|query|relative|prefix|text|style|group_(?:by|order)|template|locator|offset|max|suppress_author|))/)
argv = arguments.split(/(\B-[cCfqrptTsgGOlomA]|\B--(?:cited(_in_order)?|file|query|relative|prefix|text|style|group_(?:by|order)|type_order|template|locator|offset|max|suppress_author|))/)
parser.parse argv.map(&:strip).reject(&:empty?)
end
......@@ -294,7 +298,7 @@ module Jekyll
.map { |key| key.to_s.split(/\s*,\s*/) }
.flatten
end
def group_name(key,value)
case key
when 'type'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment