Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
caesr-pub
jekyll-scholar
Commits
b35ce69e
Commit
b35ce69e
authored
Feb 03, 2016
by
Thomas Wood
Browse files
Details page page.title variable should use filtered entry
parent
44f93965
Changes
2
Show whitespace changes
Inline
Side-by-side
features/details.feature
View file @
b35ce69e
...
...
@@ -60,6 +60,7 @@ Feature: Details
<html>
<head></head>
<body>
Page title: {{ page.title }}
Title: {{ page.entry.title }}
{{ page.entry.bibtex }}
</body>
...
...
@@ -68,6 +69,7 @@ Feature: Details
When
I run jekyll
Then
the _site directory should exist
And
the
"_site/bibliography/ruby.html"
file should exist
And I should see "Page title
:
An
Umlaut ä!" in
"_site/bibliography/ruby.html"
And I should see "Title
:
An
Umlaut ä!" in
"_site/bibliography/ruby.html"
And
I should see
"title = {An Umlaut \\\"
a!}" in
"_site/bibliography/ruby.html"
...
...
@@ -93,6 +95,7 @@ Feature: Details
<html>
<head></head>
<body>
Page title: {{ page.title }}
Title: {{ page.entry.title }}
{{ page.entry.bibtex }}
</body>
...
...
@@ -101,6 +104,7 @@ Feature: Details
When
I run jekyll
Then
the _site directory should exist
And
the
"_site/bibliography/ruby.html"
file should exist
And I should see "Page title
:
An
Umlaut \\\"a!" in
"_site/bibliography/ruby.html"
And I should see "Title
:
An
Umlaut \\\"a!" in
"_site/bibliography/ruby.html"
And
I should see
"title = {An Umlaut \\\"
a!}" in
"_site/bibliography/ruby.html"
...
...
lib/jekyll/scholar/generators/details.rb
View file @
b35ce69e
...
...
@@ -15,8 +15,8 @@ module Jekyll
process
(
@name
)
read_yaml
(
File
.
join
(
base
,
'_layouts'
),
config
[
'details_layout'
])
data
[
'title'
]
=
entry
.
title
.
to_s
if
entry
.
field?
(
:title
)
data
.
merge!
(
reference_data
(
entry
))
data
[
'title'
]
=
data
[
'entry'
][
'title'
]
if
data
[
'entry'
].
has_key?
(
'title'
)
end
end
...
...
Write
Preview
Supports
Markdown
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