use jinja2 templates to add css and formatting
This commit is contained in:
+5
-1
@@ -1,7 +1,11 @@
|
||||
from markdown_it import MarkdownIt
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
|
||||
|
||||
md = MarkdownIt("commonmark").enable('table')
|
||||
j2_env = Environment(loader=FileSystemLoader('templates'))
|
||||
template = j2_env.get_template('resume.template')
|
||||
|
||||
def mdtohtml(mdsrc):
|
||||
return md.render(mdsrc)
|
||||
rawhtml = md.render(mdsrc)
|
||||
return template.render(content=rawhtml)
|
||||
|
||||
Reference in New Issue
Block a user