Skip to content

Commit

Permalink
set title to auto built page. Closes: #1545
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuto committed Aug 17, 2020
1 parent 656605e commit 3a23663
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/review/webmaker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(<div class="part">\n)
Expand Down Expand Up @@ -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'])
Expand All @@ -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(<div class="titlepage">)
Expand Down

0 comments on commit 3a23663

Please sign in to comment.