While template properties exist generally for you to define and use as in your own markdown sources, Pamflet also checks for a special, optional property that links to a project’s GitHub repository, etc.
If you define a
github property with the repo owner and name,
Pamflet constructs a link to the repository. For example:
This is the property that produces the link to GitHub from Pamflet’s own documentation. Note that there is only one slash.
If you define an
out property with a file name,
Pamflet uses it to generate the file for the page.
It is intended to be used in the properties front matter of the page:
--- out: index.html ---
toc property may be used to control how the table of contents
is displayed at the end of each page.
The allowed values are
disqus property with a disqus short name will add a comment section at the end of all your pages.
show would display the button, but will not be included in the tweet.
google-analytics with a Google Analytics web property ID will
page.localPath is automatically set to the local path to the page’s markdown source,
which allows, for instance, the construction of a direct-to-GitHub page edit URL in the header or footer, e.g:
<div class="container"> <div class="row"> <div class="span-16 prepend-1 append-1"> <div class="span-16 nav"> <p style="padding-top: 0.5em"> <a href="https://github.com/foundweekends/pamflet/edit/master/docs/$page.localPath$"> [Edit on GitHub]</a> </p> </div> </div> </div> </div>
Scroll to the bottom of this page to see how this works.