Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
J
jekyll-scholar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
caesr-pub
jekyll-scholar
Commits
a2d22c42
Commit
a2d22c42
authored
Feb 03, 2016
by
Sylvester Keil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow local override of type_order
See #129
parent
bac7a87d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
features/grouping.feature
features/grouping.feature
+1
-1
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+6
-2
No files found.
features/grouping.feature
View file @
a2d22c42
...
...
@@ -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
|
...
...
lib/jekyll/scholar/utilities.rb
View file @
a2d22c42
...
...
@@ -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-[cCfqrptTsgG
lomA]|\B--(?:cited(_in_order)?|file|query|relative|prefix|text|style|group_(?:by|order)
|template|locator|offset|max|suppress_author|))/
)
argv
=
arguments
.
split
(
/(\B-[cCfqrptTsgG
OlomA]|\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'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment