mirror of https://github.com/mpastell/Weave.jl
Add footer to jmd template
parent
daafd8e911
commit
e0199b2e6e
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue