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
a16224df
Commit
a16224df
authored
Sep 18, 2015
by
Hendrik van Antwerpen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose extra data to details page.
parent
a7753664
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
lib/jekyll/scholar/generators/details.rb
lib/jekyll/scholar/generators/details.rb
+1
-1
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+11
-5
No files found.
lib/jekyll/scholar/generators/details.rb
View file @
a16224df
...
@@ -15,7 +15,7 @@ module Jekyll
...
@@ -15,7 +15,7 @@ module Jekyll
process
(
@name
)
process
(
@name
)
read_yaml
(
File
.
join
(
base
,
'_layouts'
),
config
[
'details_layout'
])
read_yaml
(
File
.
join
(
base
,
'_layouts'
),
config
[
'details_layout'
])
data
[
'entry'
]
=
liquidify
(
entry
)
data
.
merge!
(
reference_data
(
entry
)
)
end
end
end
end
...
...
lib/jekyll/scholar/utilities.rb
View file @
a16224df
...
@@ -272,16 +272,22 @@ module Jekyll
...
@@ -272,16 +272,22 @@ module Jekyll
def
bibliography_tag
(
entry
,
index
)
def
bibliography_tag
(
entry
,
index
)
return
missing_reference
unless
entry
return
missing_reference
unless
entry
liquid_template
.
render
({
liquid_template
.
render
(
reference_data
(
entry
,
index
).
merge
({
'index'
=>
index
,
'details'
=>
details_link_for
(
entry
)
}))
end
def
reference_data
(
entry
,
index
=
nil
)
{
'entry'
=>
liquidify
(
entry
),
'entry'
=>
liquidify
(
entry
),
'reference'
=>
reference_tag
(
entry
,
index
),
'reference'
=>
reference_tag
(
entry
,
index
),
'key'
=>
entry
.
key
,
'key'
=>
entry
.
key
,
'type'
=>
entry
.
type
.
to_s
,
'type'
=>
entry
.
type
.
to_s
,
'link'
=>
repository_link_for
(
entry
),
'link'
=>
repository_link_for
(
entry
),
'links'
=>
repository_links_for
(
entry
),
'links'
=>
repository_links_for
(
entry
)
'index'
=>
index
,
}
'details'
=>
details_link_for
(
entry
)
})
end
end
def
liquidify
(
entry
)
def
liquidify
(
entry
)
...
...
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