Run jekyll as part of the matrix-doc build

- this saves us having to run it manually on the web server.
This commit is contained in:
Richard van der Hoff 2017-08-02 16:18:20 +01:00
parent 299b60970b
commit 9d2a93ad7b
30 changed files with 1372 additions and 7 deletions

View file

@ -0,0 +1,42 @@
#!/usr/bin/env python
# :Author: David Goodger, the Pygments team, Guenter Milde
# :Date: $Date: $
# :Copyright: This module has been placed in the public domain.
# This is a merge of the `Docutils`_ `rst2html` front end with an extension
# suggestion taken from the `Pygments`_ documentation, reworked specifically
# for `Octopress`_.
#
# .. _Pygments: http://pygments.org/
# .. _Docutils: http://docutils.sourceforge.net/
# .. _Octopress: http://octopress.org/
"""
A front end to docutils, producing HTML with syntax colouring using pygments
"""
try:
import locale
locale.setlocale(locale.LC_ALL, '')
except:
pass
from transform import transform
from docutils.writers.html4css1 import Writer
from docutils.core import default_description
from directives import Pygments
description = ('Generates (X)HTML documents from standalone reStructuredText '
'sources. Uses `pygments` to colorize the content of'
'"code-block" directives. Needs an adapted stylesheet'
+ default_description)
def main():
return transform(writer=Writer(), part='html_body')
if __name__ == '__main__':
# rav 2016/10/18: encode the output as UTF-8, otherwise python will grumble
# when writing to a pipe, because it doesn't know how to encode unicode
# strings.
print(main().encode('utf-8'))