comparison tools/ssg101/ssg101.py @ 1200:b9514abc2a67

Initial commit of ssg101.
author Brian Neal <bgneal@gmail.com>
date Sat, 24 Jun 2023 16:06:51 -0500
parents
children
comparison
equal deleted inserted replaced
1199:45ce2c20a4e7 1200:b9514abc2a67
1 import jinja2
2
3
4 def main():
5 print('Hello World')
6
7 env = jinja2.Environment(
8 loader=jinja2.PackageLoader('ssg101'),
9 )
10 template = env.get_template('home.html')
11
12 with open('output/home.html', 'w') as fp:
13 fp.write(template.render())
14
15
16 if __name__ == '__main__':
17 main()