Fix title generation for index page
This commit is contained in:
parent
d93cca964e
commit
c7b56161a5
1 changed files with 6 additions and 5 deletions
|
|
@ -142,11 +142,12 @@ class Generator {
|
|||
const title = body.match(/^#([^\n\r]+)/i) || []
|
||||
|
||||
let result = this._layout
|
||||
|
||||
result = result.replace(
|
||||
/<title>Mithril\.js<\/title>/,
|
||||
`<title>${title[1]} - Mithril.js</title>`
|
||||
)
|
||||
if (title[1]) {
|
||||
result = result.replace(
|
||||
/<title>Mithril\.js<\/title>/,
|
||||
`<title>${title[1]} - Mithril.js</title>`
|
||||
)
|
||||
}
|
||||
|
||||
// update version
|
||||
result = result.replace(/\[version\]/g, this._version)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue