From 4cfd0c4070eaf97bc31bdf9435f3f1598a1f6e1a Mon Sep 17 00:00:00 2001 From: Pat Cavit Date: Mon, 10 Apr 2017 23:43:10 -0700 Subject: [PATCH] docs: load mithril on mithril.js.org For futzing around in the dev console --- docs/generate.js | 2 +- docs/index.md | 2 ++ docs/layout.html | 5 +++-- package.json | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) 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. - - + + +