parent:
ef26db22e729919e0d068c4cbe50c7219bad0704
Nick Mykins <nick.mykins@gmail.com>
2014-11-08T09:07:41-05:00
better post index
diff --git a/cowpostindextemplate.html b/cowpostindextemplate.html
new file mode 100644
index 0000000000000000000000000000000000000000..41fdc942d26b49b84690a5f3ce26e12c2992ee2e
--- /dev/null
+++ b/cowpostindextemplate.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <title>nick's tilde.farm page</title>
+ </head>
+ <body>
+ <link rel="stylesheet" type="text/css" href="../style.css">
+ <h1>~ nick at tilde dot farm ~</h1>
+ <ol>
+ {% for cowpost in cowposts %}
+ <li> <a href="{{cowpost.htmltitle}}">{{cowpost.htmltitle}}</a>
+ {% endfor %}
+ </ol>
+ </body>
+</html>
diff --git a/deploy.py b/deploy.py
index 4c6dcb36469803c90d82c2bc1456cec5e6a9f2e6..cecd9224b2d8230f0837c51d82bd9f9a1209af77 100644
--- a/deploy.py
+++ b/deploy.py
@@ -30,8 +30,12 @@
def write_cowfiles(cowposts):
cowtemplate = template_env.get_template('cowtemplate.html')
cowposttemplate = template_env.get_template('cowposttemplate.html')
+ cowpostindextemplate = template_env.get_template(
+ 'cowpostindextemplate.html')
with open(PATH + '/public_html/index.html', 'w') as moo:
moo.write(cowtemplate.render(cowposts=cowposts))
+ with open(PATH + '/cowposts_html/index.html', 'w') as moo:
+ moo.write(cowpostindextemplate.render(cowposts=reversed(cowposts)))
for cowpost in cowposts:
with open(PATH + '/cowposts_html/%s'
% cowpost['htmltitle'], 'w') as moo: