git.fiddlerwoaroof.com
name mode size
..
README.html 100644 2 kb
TODO.html 100644 1 kb
index.html 100644 1 kb
README.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="generator" content="blog-gen"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <title></title> <!--[if lt IE 9]> <style type="text/css">code{white-space: pre;}</style> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script> </head> <body> <div class="container has_description"> <h2 id="my-simplistic-blogfile-generator">My simplistic blogfile generator</h2> <p>This is a relatively simple blog generator that uses mako and pandoc to produce html pages with MathJaX includes.</p> <h3 id="usage">Usage</h3> <pre><code>python3 -m blog-gen &lt;infile&gt; [-b &lt;base-template&gt;]</code></pre> <p>The input file is any old pandoc markdown file. The base template is specified relative to the template lookup's root: it defaults to &quot;base.html&quot;. Running this command will spit out a static page that contains the rendered markdown. The cool thing about this is that pandoc will convert Latex math expressions like <code>$x_2 + \frac{1}{2}x_{1}^{2}$</code> into the MathJaX equivalent: if you run this file through the blog generator, you'd get: <span class="math">\(x_2 + \frac{1}{2}x_{1}^{2}\)</span> (for example, see [raw/master/processed_README.html])</p> <h3 id="installation">Installation</h3> <h4 id="prerequisites">Prerequisites</h4> <p>The only prerequisite that cannot be installed with pip is pandoc, which can either be installed via <code>cabal install</code> or from your distribution's package archives.</p> <h4 id="steps">Steps</h4> <ol type="1"> <li>run initialize.sh</li> <li>copy contents of pyandoc_mods to lib/python3.4/site-packages/pandoc/<strong>init</strong>.py</li> </ol> <ul> <li>Eventually I'll try to get these changes merged back upstream</li> <li>The biggest change is addition of mathjax to the output options</li> <li>Other changes: <ul> <li>Making the relative import in <strong>init</strong>.py work in python 3</li> <li>Autodetecting pandoc location</li> </ul></li> </ul> <ol start="3" type="1"> <li>for now, the generator must be run from the repository's root directory</li> </ol> </div> </body> </html>