diff --git a/features/details.feature b/features/details.feature index 20eaaf088c35c7f854fc71c039e869e8c4e1d4fc..61bc1bc3a580e094c1b71f2a6b942eb7bd79e83b 100644 --- a/features/details.feature +++ b/features/details.feature @@ -60,6 +60,7 @@ Feature: Details + Page title: {{ page.title }} Title: {{ page.entry.title }} {{ page.entry.bibtex }} @@ -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 + Page title: {{ page.title }} Title: {{ page.entry.title }} {{ page.entry.bibtex }} @@ -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" diff --git a/lib/jekyll/scholar/generators/details.rb b/lib/jekyll/scholar/generators/details.rb index 7f22862fbd6b7ebffcbba9776d0c3edf25e03cdb..1898f272a5fdbf303c9522922c9300e6d704d764 100644 --- a/lib/jekyll/scholar/generators/details.rb +++ b/lib/jekyll/scholar/generators/details.rb @@ -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