Chris Valentine
Chris Valentine

Reputation: 1637

Markdown that incorporates standard header

I would like to standardize my technical documents. To simplify it, I'd like to use markdown but I also want it to incorporate a standard header and footer and versioning.

How can I include the header and footer in to each new document?

I would like something like this:

Header:

####My Company
![](http://image/file.jpg)
---

Footer:

---
<sup>File version:[version]</sup>
<sup>Compiled [date]</sup>

And then each tech document would be as such:

{include header.md}

- technical
- stuff
- and 
- other stuff

{included footer.md}

Then when converted to html or pdf it would just combine them all into one pretty document.

Alternatively if you can compile multiple documents into one out put like this:

markdown2pdf header.md body.md footer.md -o output.pdf

That would work too (syntax for that command was made up for example)

Is there a way to achieve this already using python or ruby, before I reinvent the wheel?

Upvotes: 0

Views: 435

Answers (1)

Todd A. Jacobs
Todd A. Jacobs

Reputation: 84413

A lot depends on the specific implementation. Pandoc supports this through template variables. A good place to start hacking templates might be to take a look at the pandoc-templates Git repository, and see what you can leverage within the license.

Upvotes: 1

Related Questions