Permalink
Browse files

Reject non .md files in build, add /site

  • Loading branch information...
1 parent 14c435e commit fa75d4027c8056f43935113e2719cd5a82cce485 @dash1291 committed Apr 1, 2012
Showing with 10 additions and 5 deletions.
  1. +3 −2 build.py
  2. 0 { → site}/static/blog.css
  3. +3 −3 templates/base.html
  4. +4 −0 templates/post.html
View
@@ -41,7 +41,8 @@ def init():
if os.path.exists(dirname) != True:
os.mkdir(dirname)
for name in files:
- html = build_page(root + '/' + name)
- open(dirname + '/' + name[:-3] + '.html', 'w').write(html)
+ if '.md' in name:
+ html = build_page(root + '/' + name)
+ open(dirname + '/' + name[:-3] + '.html', 'w').write(html)
if __name__=='__main__':
init()
File renamed without changes.
View
@@ -2,9 +2,9 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>{% block title %}Home{% end block %}|Ashish Dubey's Blog</title>
+ <title>{% block title %}Home{% endblock %}|Ashish Dubey's Blog</title>
<link rel="stylesheet" href="/static/style.css" type="text/css"/>
- {% block head %}{% end %}
+ {% block head %}{% endblock %}
</head>
<body>
<div id="container">
@@ -15,7 +15,7 @@
<a href="/about/">About</a>
</div>
</div>
- <div id="content">{% block content %}{% block end %}</div>
+ <div id="content">{% block content %}{% endblock %}</div>
<div id="footer">
Powered by Python.
</div>
View
@@ -0,0 +1,4 @@
+{% extends "base.html" %}
+{% block title %} {{ title }} {% endblock %}
+{% block content %} {{ content }} {% endblock %}
+

0 comments on commit fa75d40

Please sign in to comment.