mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
use templates
This commit is contained in:
parent
3c2431ffee
commit
0a05ade5d4
|
|
@ -3,11 +3,19 @@
|
|||
# TODO : fetch from https://github.com/snmsts/roswell/wiki and convert all
|
||||
# wiki pages (mediawiki format or markdown) to html or man
|
||||
|
||||
|
||||
# see also:
|
||||
# http://pandoc.org/README.html#using-variables-in-templates
|
||||
# https://github.com/jgm/pandoc-templates/blob/master/default.man
|
||||
|
||||
# separated by semicolons
|
||||
PANDOC_AUTHORS="SANO Masatoshi"
|
||||
|
||||
%.1: %.md
|
||||
pandoc -f markdown_phpextra -t man $< > $@
|
||||
pandoc -f markdown_phpextra -t man -V title="$*" -V section=$(subst .,,$(suffix $@)) -V author=$(PANDOC_AUTHORS) --template=default.man $< > $@
|
||||
|
||||
%.html: %.md
|
||||
pandoc -f markdown_phpextra -t html5 $< > $@
|
||||
pandoc -f markdown_phpextra -t html5 -V title="$*" author=$(PANDOC_AUTHORS) $< > $@
|
||||
|
||||
if MANUAL_GENERATE
|
||||
man1_MANS = $(shell ls *.md | sed s/md/1/g) $(shell ls *.md | sed s/md/html/g)
|
||||
|
|
|
|||
30
documents/default.man
Normal file
30
documents/default.man
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
$if(has-tables)$
|
||||
.\"t
|
||||
$endif$
|
||||
$if(pandoc-version)$
|
||||
.\" Automatically generated by Pandoc $pandoc-version$
|
||||
.\"
|
||||
$endif$
|
||||
$if(adjusting)$
|
||||
.ad $adjusting$
|
||||
$endif$
|
||||
.TH "$title$" "$section$" "$date$" "$footer$" "$header$"
|
||||
$if(hyphenate)$
|
||||
.hy
|
||||
$else$
|
||||
.nh \" Turn off hyphenation by default.
|
||||
$endif$
|
||||
$for(header-includes)$
|
||||
$header-includes$
|
||||
$endfor$
|
||||
$for(include-before)$
|
||||
$include-before$
|
||||
$endfor$
|
||||
$body$
|
||||
$for(include-after)$
|
||||
$include-after$
|
||||
$endfor$
|
||||
$if(author)$
|
||||
.SH AUTHORS
|
||||
$for(author)$$author$$sep$; $endfor$.
|
||||
$endif$
|
||||
Loading…
Reference in a new issue