# mk_html_template
def mk_html_template(home, sec_prev, sec_next)
template = <<~EOS
$title$
EOS
if home == nil
template = template.sub(/@@@home/,'')
else
template = template.sub(/@@@home/, "\nHome\n\n")
end
if sec_prev == nil
template = template.sub(/@@@prev/,'')
else
i = sec_prev.match(/\d+/).to_a[0]
template = template.sub(/@@@prev/, "\nPrev: section#{i}\n\n")
end
if sec_next == nil
template = template.sub(/@@@next/,'')
else
i = sec_next.match(/\d+/).to_a[0]
template = template.sub(/@@@next/, "\nNext: section#{i}\n\n")
end
File.write("docs/template.html", template)
end