tiltle, author, date + template for html5 output
This commit is contained in:
parent
40e0d8669f
commit
e8ffa3c3ce
4
nnnew.sh
4
nnnew.sh
@ -79,9 +79,11 @@ if [ -z "$BIBLIOGRAPHE_PATH" ]; then
|
||||
else
|
||||
node $BIBLIOGRAPHE_PATH/refactorbib.js --data $BIB > tmpbib.json
|
||||
REFERENCE=$(node $BIBLIOGRAPHE_PATH/generatebib.js --data tmpbib.json --items [\"$REF\"] --output md)
|
||||
AUTHOR=$(whoami)
|
||||
DATE=$(date +%Y\-%m\-%d)
|
||||
echo $REFERENCE
|
||||
rm tmpbib.json
|
||||
sed -i.bak "s~*MACHINE-REF*~$REFERENCE~g" notes.mmd
|
||||
sed -i.bak "s~*MACHINE-REF*~$REFERENCE~g ; s~%\ title~%\ $REFERENCE~g ; s~%\ author~%\ $AUTHOR~g ; s~%\ date~%\ $DATE~g" notes.mmd
|
||||
fi
|
||||
|
||||
# cleanup
|
||||
|
||||
@ -17,7 +17,7 @@ $(OUT)%.pdf : %.mmd
|
||||
HTML := $(patsubst %.mmd,$(OUT)%.html,$(wildcard *.mmd))
|
||||
|
||||
$(OUT)%.html : %.mmd
|
||||
pandoc $< -s --filter pandoc-citeproc --csl $(CSL) --bibliography $(BIB) -o $@
|
||||
pandoc $< -s -t html5 --template=p/nnnote-template.html5 --filter pandoc-citeproc --csl $(CSL) --bibliography $(BIB) -o $@
|
||||
|
||||
all : dir $(HTML) index
|
||||
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
% title
|
||||
% author
|
||||
% date
|
||||
|
||||
### Reference
|
||||
|
||||
*MACHINE-REF
|
||||
|
||||
54
template/p/nnnote-template.html5
Normal file
54
template/p/nnnote-template.html5
Normal file
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html$if(lang)$ lang="$lang$"$endif$>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="generator" content="pandoc">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
$for(author-meta)$
|
||||
<meta name="author" content="$author-meta$">
|
||||
$endfor$
|
||||
$if(date-meta)$
|
||||
<meta name="dcterms.date" content="$date-meta$">
|
||||
$endif$
|
||||
<title>$if(title-prefix)$$title-prefix$ - $endif$$pagetitle$</title>
|
||||
<style type="text/css">code{white-space: pre;}</style>
|
||||
$if(quotes)$
|
||||
<style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
|
||||
$endif$
|
||||
$if(highlighting-css)$
|
||||
<style type="text/css">
|
||||
$highlighting-css$
|
||||
</style>
|
||||
$endif$
|
||||
$for(css)$
|
||||
<link rel="stylesheet" href="$css$">
|
||||
$endfor$
|
||||
$if(math)$
|
||||
$math$
|
||||
$endif$
|
||||
$for(header-includes)$
|
||||
$header-includes$
|
||||
$endfor$
|
||||
</head>
|
||||
<body>
|
||||
$for(include-before)$
|
||||
$include-before$
|
||||
$endfor$
|
||||
$if(title)$
|
||||
<header>
|
||||
$if(date-meta)$
|
||||
<p>$date-meta$</p>
|
||||
$endif$
|
||||
</header>
|
||||
$endif$
|
||||
$if(toc)$
|
||||
<nav id="$idprefix$TOC">
|
||||
$toc$
|
||||
</nav>
|
||||
$endif$
|
||||
$body$
|
||||
$for(include-after)$
|
||||
$include-after$
|
||||
$endfor$
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user