on progresse
This commit is contained in:
parent
7c5a7fe392
commit
25614b72e0
10
geminer.py
10
geminer.py
|
@ -123,10 +123,16 @@ for dirname, subdirlist, mdlist in os.walk('.'):
|
||||||
|
|
||||||
posts_meta.sort(key=lambda p: p["date"], reverse=True)
|
posts_meta.sort(key=lambda p: p["date"], reverse=True)
|
||||||
|
|
||||||
|
# Generate home page
|
||||||
with open(tpl_path+"/index.tpl", 'r') as tpl:
|
with open(tpl_path+"/index.tpl", 'r') as tpl:
|
||||||
template = Template(tpl.read())
|
template = Template(tpl.read())
|
||||||
|
|
||||||
indextext = template.render(posts_meta=posts_meta)
|
indextext = template.render(posts_meta=posts_meta)
|
||||||
|
|
||||||
with open(meta_path+"/index.gmi", 'w') as index:
|
with open(meta_path+"/index.gmi", 'w') as index:
|
||||||
index.write(indextext)
|
index.write(indextext)
|
||||||
|
|
||||||
|
# Generate full list page
|
||||||
|
with open(tpl_path+"/posts_list.tpl", 'r') as tpl:
|
||||||
|
template = Template(tpl.read())
|
||||||
|
indextext = template.render(posts_meta=posts_meta)
|
||||||
|
with open(meta_path+"/posts/index.gmi", 'w') as index:
|
||||||
|
index.write(indextext)
|
||||||
|
|
Loading…
Reference in New Issue