Tornado web plugin to generate pages from Markdown. Markdown may be stored in a foreign repository for high flexability and control.
Inspiration credited to Scalling Asana.com
- Request handler plugin for Tornado Web
- Github Integration by storing you markdown in a seperate repository
- Renders static markdown pages
- Caches page build for speed via Debris
pip install torndown
import os
import torndown
import tornado.web
import tornado.ioloop
import tornado.httpclient
# Repository
os.environ["TORNDOWN_REPO"] = "stevepeak/torndown"
# The template to insert the rendered markdown
os.environ["TORNDOWN_TEMPLATE"] = "../example/base.html"
application = tornado.web.Application([
# !important to have the r"(.*)"
(r"/(.*)", torndown.TorndownHandler)
])
if __name__ == '__main__':
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()
Your support documentation, about us, home page copy and more can be stores in markdown files
in a seperate repository. There are many advantages to this. To learn more please read this
great article by Justin Krause at Asana which describes pretty much exactly what
Torndown
can do for your website.