name | mode | size |
---|---|---|
.. | ||
__init__.py | 100644 | |
__main__.py | 100644 | 2 kb |
## My simplistic blogfile generator
This is a relatively simple blog generator that uses mako and pandoc to produce html pages with MathJaX
includes.
### Usage
python3 -m blog-gen <infile> [-b <base-template>]
The input file is any old pandoc markdown file. The base template is specified relative to the template
lookup's root: it defaults to "base.html". 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
`$x_2 + \frac{1}{2}x_{1}^{2}$` into the MathJaX equivalent: if you run this file through the blog generator,
you'd get: $x_2 + \frac{1}{2}x_{1}^{2}$ (for example, see [raw/master/processed_README.html])
### Installation
#### Prerequisites
The only prerequisite that cannot be installed with pip is pandoc, which can either be installed via `cabal install`
or from your distribution's package archives.
#### Steps
1. run initialize.sh
2. copy contents of pyandoc_mods to lib/python3.4/site-packages/pandoc/__init__.py
- Eventually I'll try to get these changes merged back upstream
- The biggest change is addition of mathjax to the output options
- Other changes:
- Making the relative import in __init__.py work in python 3
- Autodetecting pandoc location
3. for now, the generator must be run from the repository's root directory