diff --git a/docs/generate.js b/docs/generate.js index 52bc3e70..4a6e8b54 100644 --- a/docs/generate.js +++ b/docs/generate.js @@ -48,7 +48,7 @@ function generate(pathname) { var title = fixed.match(/^#([^\n\r]+)/i) || [] var html = layout .replace(/Mithril\.js<\/title>/, "<title>" + title[1] + " - Mithril.js") - .replace(/\[version\]/, version) // update version + .replace(/\[version\]/g, version) // update version .replace(/\[body\]/, markedHtml) .replace(/(.+?)<\/h.>/gim, function(match, n, id, text) { // fix anchors var anchor = text.toLowerCase().replace(/<(\/?)code>/g, "").replace(/.+?<\/a>/g, "").replace(/\.|\[|\]|"|\/|\(|\)/g, "").replace(/\s/g, "-"); diff --git a/docs/index.md b/docs/index.md index 86aca2cc..5a634a3e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -65,6 +65,8 @@ Let's create an HTML file to follow along: ``` +Mithril is also loaded onto this page already, so you can start poking at the `m` object in the developer console right away if you'd like! + --- ### Hello world diff --git a/docs/layout.html b/docs/layout.html index f5ce0231..02e07a0b 100644 --- a/docs/layout.html +++ b/docs/layout.html @@ -26,8 +26,9 @@ License: MIT. © Leo Horie. - - + + +