Add footer to jmd template

pull/66/head
Matti Pastell 2016-12-13 15:52:33 +02:00
parent daafd8e911
commit e0199b2e6e
2 changed files with 15 additions and 1 deletions

View File

@ -43,11 +43,16 @@ function render_doc(formatted, doc::WeaveDoc, format::JMarkdown2HTML)
css = readstring(buf)
close(buf)
path, wsource = splitdir(abspath(doc.source))
wversion = string(Pkg.installed("Weave"))
wtime = string(Date(now()))
theme_css = readstring(joinpath(dirname(@__FILE__), "../templates/skeleton_css.txt"))
template = Mustache.template_from_file(joinpath(dirname(@__FILE__), "../templates/julia_html.txt"))
return Mustache.render(template, themecss = theme_css,
highlightcss = css, body = formatted, header_script = doc.header_script)
highlightcss = css, body = formatted, header_script = doc.header_script,
source = wsource, wtime = wtime, wversion = wversion)
end
function format_chunk(chunk::DocChunk, formatdict, docformat)

View File

@ -18,6 +18,15 @@
{{{ :body }}}
<HR/>
<div class="footer"><p>
Published from <a href="{{{:source}}}">{{{:source}}}</a> using
<a href="http://github.com/mpastell/Weave.jl">Weave.jl</a>
{{:wversion}} on {{:wtime}}.
<p></div>
</div>
</div>
</div>