diff --git a/Shake.hs b/Shake.hs
index f06d19227..2c80c7ef3 100755
--- a/Shake.hs
+++ b/Shake.hs
@@ -244,7 +244,9 @@ main = do
phony "releasemanual0.27" $ do
-- XXX under doc so hakyll-std will render it
cmd "mkdir -p site/doc/0.27" :: Action ExitCode
- cmd Shell "git show 0.27:doc/manual.md >site/doc/0.27/manual.md"
+ cmd Shell "git show 0.27:doc/manual.md >site/doc/0.27/manual.md" :: Action ExitCode
+ cmd Shell "patch site/doc/0.27/manual.md doc/manual0.27.diff "
+
-- build standard hakyll script used for site rendering
hakyllstd %> \out -> do
diff --git a/doc/lib.m4 b/doc/lib.m4
index 851a8320b..d5f88dd83 100644
--- a/doc/lib.m4
+++ b/doc/lib.m4
@@ -10,11 +10,17 @@ m4_define({{_author_}}, {{}})m4_dnl
m4_define({{_monthyear_}}, {{May 2016}})m4_dnl
m4_define({{_currentrelease_}}, {{0.27}})m4_dnl
m4_define({{_version_}}, {{0.28}})m4_dnl
+m4_dnl
+m4_dnl Links to dev and recent release versions of a manual.
+m4_dnl $1 is the manual's web slug: hledger, hledger-ui, journal, csv etc.
+m4_dnl The current version is hidden (or whatever) by highlightDocVersion in site.js.
+m4_dnl
m4_define({{_versions_}},
)m4_dnl
m4_dnl
m4_define({{_toc_}}, {{* toc}})m4_dnl
diff --git a/doc/manual0.27.diff b/doc/manual0.27.diff
new file mode 100644
index 000000000..c93e44974
--- /dev/null
+++ b/doc/manual0.27.diff
@@ -0,0 +1,15 @@
+4a5,12
+>
+> This doc is for version **0.27**.
+> Other versions:
+>
0.28dev
+>
+>
+>
+>
+2198a2207,2208
+>
+>
+2316a2327,2328
+>
+>
diff --git a/hledger-api/doc/hledger-api.1.m4.md b/hledger-api/doc/hledger-api.1.m4.md
index 93cc224a1..8b15726aa 100644
--- a/hledger-api/doc/hledger-api.1.m4.md
+++ b/hledger-api/doc/hledger-api.1.m4.md
@@ -3,11 +3,7 @@
% _monthyear_
_web_({{
-m4_dnl _versions_({{hledger-api}})
-
+_versions_({{hledger-api}})
_toc_
}})
diff --git a/site/js/site.js b/site/js/site.js
index 3b4e129ba..089572df0 100644
--- a/site/js/site.js
+++ b/site/js/site.js
@@ -6,7 +6,7 @@ function highlightDocVersion() {
$('.versions').each( function() {
var parts = window.location.pathname.split('/');
var dir = parts.length > 1 ? parts[parts.length-2] : '';
- var ver = $.isNumeric(dir) ? dir : 'dev';
+ var ver = $.isNumeric(dir) ? dir : '0.28';
$(this).find('a').each( function() {
if ($(this).html() == ver)
$(this)
@@ -14,6 +14,7 @@ function highlightDocVersion() {
.css('text-decoration', 'none')
.css('color', 'initial')
// .css('font-weight','bold');
+ .hide()
});
});
}