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
5819d1d3
Commit
5819d1d3
authored
Jan 20, 2014
by
Sylvester Keil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move liquidify to utilities
parent
e809c2c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
19 deletions
+18
-19
lib/jekyll/scholar/generators/details.rb
lib/jekyll/scholar/generators/details.rb
+1
-18
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+17
-1
No files found.
lib/jekyll/scholar/generators/details.rb
View file @
5819d1d3
...
...
@@ -14,24 +14,7 @@ module Jekyll
process
(
@name
)
read_yaml
(
File
.
join
(
base
,
'_layouts'
),
config
[
'details_layout'
])
liquidify
(
entry
)
end
private
def
liquidify
(
entry
)
data
[
'entry'
]
=
{}
data
[
'entry'
][
'key'
]
=
entry
.
key
data
[
'entry'
][
'type'
]
=
entry
.
type
data
[
'entry'
][
'bibtex'
]
=
entry
.
to_s
entry
.
fields
.
each
do
|
key
,
value
|
value
=
value
.
convert
(
*
bibtex_filters
)
unless
bibtex_filters
.
empty?
data
[
'entry'
][
key
.
to_s
]
=
value
.
to_s
end
data
[
'entry'
]
=
liquidify
(
entry
)
end
end
...
...
lib/jekyll/scholar/utilities.rb
View file @
5819d1d3
...
...
@@ -158,7 +158,7 @@ module Jekyll
return
missing_reference
unless
entry
bibliography_template
.
render
({
'entry'
=>
entry
,
'entry'
=>
liquidify
(
entry
)
,
'reference'
=>
reference_tag
(
entry
),
'key'
=>
entry
.
key
,
'type'
=>
entry
.
type
,
...
...
@@ -167,6 +167,22 @@ module Jekyll
})
end
def
liquidify
(
entry
)
e
=
{}
e
[
'key'
]
=
entry
.
key
e
[
'type'
]
=
entry
.
type
e
[
'bibtex'
]
=
entry
.
to_s
entry
.
fields
.
each
do
|
key
,
value
|
value
=
value
.
convert
(
*
bibtex_filters
)
unless
bibtex_filters
.
empty?
e
[
key
.
to_s
]
=
value
.
to_s
end
e
end
def
generate_details?
site
.
layouts
.
key?
(
File
.
basename
(
config
[
'details_layout'
],
'.html'
))
end
...
...
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