From 3a236633a60ba85a53f067ea395413d7a1b9d558 Mon Sep 17 00:00:00 2001 From: Kenshi Muto Date: Mon, 17 Aug 2020 22:59:10 +0900 Subject: [PATCH] set title to auto built page. Closes: #1545 --- lib/review/webmaker.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/review/webmaker.rb b/lib/review/webmaker.rb index d28387931..fd2a9b818 100644 --- a/lib/review/webmaker.rb +++ b/lib/review/webmaker.rb @@ -156,6 +156,7 @@ def build_body(basetmpdir, _yamlfile) end def build_part(part, basetmpdir, htmlfile) + @title = "#{ReVIEW::I18n.t('part', part.number)} #{part.name.strip}" File.open("#{basetmpdir}/#{htmlfile}", 'w') do |f| @body = '' @body << %Q(
\n) @@ -259,6 +260,7 @@ def copy_frontmatter(basetmpdir) end def build_indexpage(basetmpdir) + @title = 'index' File.open("#{basetmpdir}/index.html", 'w') do |f| if @config['coverimage'] file = File.join(@config['imagedir'], @config['coverimage']) @@ -281,6 +283,7 @@ def build_indexpage(basetmpdir) end def build_titlepage(basetmpdir, htmlfile) + @title = 'titlepage' File.open("#{basetmpdir}/#{htmlfile}", 'w') do |f| @body = '' @body << %Q(
)