Fix title generation for index page

This commit is contained in:
Stephan Hoyer 2022-02-18 09:35:22 +01:00
parent d93cca964e
commit c7b56161a5

View file

@ -142,11 +142,12 @@ class Generator {
const title = body.match(/^#([^\n\r]+)/i) || [] const title = body.match(/^#([^\n\r]+)/i) || []
let result = this._layout let result = this._layout
if (title[1]) {
result = result.replace( result = result.replace(
/<title>Mithril\.js<\/title>/, /<title>Mithril\.js<\/title>/,
`<title>${title[1]} - Mithril.js</title>` `<title>${title[1]} - Mithril.js</title>`
) )
}
// update version // update version
result = result.replace(/\[version\]/g, this._version) result = result.replace(/\[version\]/g, this._version)