mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
site: ensure 0.27 manual is in place for links
Stripping hledger- from the link fragment with patsubst isn't working.
This commit is contained in:
parent
778b78e0b9
commit
6529daf20c
11
Shake.hs
11
Shake.hs
@ -175,6 +175,7 @@ main = do
|
|||||||
need $
|
need $
|
||||||
webmanpages ++
|
webmanpages ++
|
||||||
[webmanual
|
[webmanual
|
||||||
|
,"releasemanual"
|
||||||
,hakyllstd
|
,hakyllstd
|
||||||
]
|
]
|
||||||
cmd Shell (Cwd "site") "hakyll-std/hakyll-std" "build"
|
cmd Shell (Cwd "site") "hakyll-std/hakyll-std" "build"
|
||||||
@ -212,6 +213,14 @@ main = do
|
|||||||
"--filter doc/pandoc-demote-headers"
|
"--filter doc/pandoc-demote-headers"
|
||||||
">>" webmanual :: Action ExitCode
|
">>" webmanual :: Action ExitCode
|
||||||
|
|
||||||
|
-- check out and render manual pages for the current release also
|
||||||
|
phony "releasemanual" $ need [ "releasemanual0.27" ]
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
-- build standard hakyll script used for site rendering
|
-- build standard hakyll script used for site rendering
|
||||||
hakyllstd %> \out -> do
|
hakyllstd %> \out -> do
|
||||||
let dir = takeDirectory out
|
let dir = takeDirectory out
|
||||||
@ -222,7 +231,7 @@ main = do
|
|||||||
|
|
||||||
phony "clean" $ do
|
phony "clean" $ do
|
||||||
putNormal "Cleaning generated files"
|
putNormal "Cleaning generated files"
|
||||||
removeFilesAfter "." ["hledger/doc/hledger.1.md"]
|
removeFilesAfter "." mdmanpages
|
||||||
removeFilesAfter "." webmanpages
|
removeFilesAfter "." webmanpages
|
||||||
removeFilesAfter "." [webmanual]
|
removeFilesAfter "." [webmanual]
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@ m4_define({{_shellbold_}}, {{```{.shell .bold .clear}$1```}})m4_dnl
|
|||||||
m4_define({{_journal_}}, {{```{.journal .clear}$1```}})m4_dnl
|
m4_define({{_journal_}}, {{```{.journal .clear}$1```}})m4_dnl
|
||||||
m4_define({{_currentrelease_}}, {{0.27}})m4_dnl
|
m4_define({{_currentrelease_}}, {{0.27}})m4_dnl
|
||||||
m4_define({{_versions_}},
|
m4_define({{_versions_}},
|
||||||
{{<div class="versions">
|
<div class="versions">
|
||||||
version:
|
version:
|
||||||
<a href="$1.html">dev</a>
|
<a href="$1.html">dev</a>
|
||||||
| <a href="_currentrelease_()/$1.html">_currentrelease_()</a>
|
| <a href="doc/_currentrelease_()/manual.html{{#}}m4_patsubst($1,{{hledger-}})">_currentrelease_()</a>
|
||||||
</div>}})m4_dnl
|
</div>)m4_dnl
|
||||||
|
1
site/.gitignore
vendored
1
site/.gitignore
vendored
@ -12,3 +12,4 @@ journal.md
|
|||||||
timeclock.md
|
timeclock.md
|
||||||
timedot.md
|
timedot.md
|
||||||
manual.md
|
manual.md
|
||||||
|
[0-9].*
|
Loading…
Reference in New Issue
Block a user