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[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: