summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2012-10-27 17:28:15 +0200
committerMarcel Klehr <mklehr@gmx.net>2012-10-27 17:28:15 +0200
commit3d1fd05085924388f6577a24c9b62ad0b4949661 (patch)
treea5e3bd806e26d20d3604cfceb67af1ad41aa1a3c
parentd5ace6c163ae6ec3789027c5301ae90beeb1f229 (diff)
downloadetherpad-lite-3d1fd05085924388f6577a24c9b62ad0b4949661.zip
Insert epl version into template.
-rw-r--r--Makefile2
-rw-r--r--doc/template.html4
-rw-r--r--tools/doc/html.js1
3 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 01f30701..b6419217 100644
--- a/Makefile
+++ b/Makefile
@@ -2,12 +2,14 @@ doc_dirs = doc $(wildcard doc/*/)
outdoc_dirs = out $(addprefix out/,$(doc_dirs))
doc_sources = $(wildcard doc/*/*.md) $(wildcard doc/*.md)
outdoc_files = $(addprefix out/,$(doc_sources:.md=.html))
+VERSION = $(shell node -e "console.log( require('./src/package.json').version )")
docs: $(outdoc_files)
out/doc/%.html: doc/%.md
mkdir -p $(@D)
node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
+ cat $@ | sed 's/__VERSION__/${VERSION}/' > $@
clean:
rm -rf out/
diff --git a/doc/template.html b/doc/template.html
index 2eb93987..edc0af66 100644
--- a/doc/template.html
+++ b/doc/template.html
@@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
- <title>__SECTION__ Etherpad-Lite Manual &amp; Documentation</title>
+ <title>__SECTION__ - Etherpad Lite v__VERSION__ Manual &amp; Documentation</title>
<link rel="stylesheet" href="style.css">
</head>
<body class="apidoc" id="api-section-__FILENAME__">
<header id="header">
- <h1>Etherpad-Lite Manual &amp; Documentation</h1>
+ <h1>Etherpad-Lite v__VERSION__ Manual &amp; Documentation</h1>
</header>
<div id="toc">
diff --git a/tools/doc/html.js b/tools/doc/html.js
index c52fff70..700ab18c 100644
--- a/tools/doc/html.js
+++ b/tools/doc/html.js
@@ -48,7 +48,6 @@ function render(lexed, filename, template, cb) {
template = template.replace(/__FILENAME__/g, filename);
template = template.replace(/__SECTION__/g, section);
- template = template.replace(/__VERSION__/g, process.version);
template = template.replace(/__TOC__/g, toc);
// content has to be the last thing we do with