Skip to content

Commit

Permalink
Adds Disqus comments service
Browse files Browse the repository at this point in the history
  • Loading branch information
dash1291 committed Apr 7, 2012
1 parent 4f4a034 commit 9a5dc46
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def build_page(doc_path):
doc_string = open(doc_path).read()
options = build_options(doc_string)
doc_string = strip_options(doc_string)
doc_html = markdown.markdown(doc_string)
doc_html = markdown.markdown(doc_string, ['codehilite'])
page_title = options['title']
context = {'site_prefix': SITE_PREFIX, 'title': page_title, 'content': doc_html}
if '/' in doc_path[7:]:
Expand All @@ -57,7 +57,7 @@ def build_page(doc_path):
def build_home():
template = env.get_template('home.html')
rendered = template.render(site_prefix=SITE_PREFIX, recent_posts=posts[:4])
open('./site/home.html', 'w').write(rendered)
open('./site/index.html', 'w').write(rendered)

def build_posts_list():
template = env.get_template('posts.html')
Expand Down
Binary file removed static/.style.css.swp
Binary file not shown.
15 changes: 9 additions & 6 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ body {
font-family: "Palatino";
color: #666633;
font-size: 24pt;
clear: both;
}

a {
Expand All @@ -28,8 +29,6 @@ a:hover {
}

#footer {
position: absolute;
bottom: 0px;
}

#nav {
Expand Down Expand Up @@ -58,10 +57,6 @@ a:hover {
color: black;
}

#content {
clear:both;
}

.post-item {
margin-bottom: 20px;
clear: both;
Expand All @@ -76,3 +71,11 @@ a:hover {
font-size: 16pt;
margin-right: 20px;
}

.post h1 {
margin-bottom:5px;
}

.post-meta {
margin-bottom:20px;
}
6 changes: 3 additions & 3 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<div id="header">
<div id="nav">
<ul>
<li><a href="{{ site_prefix }}/home.html">Home</a></li>
<li><a href="{{ site_prefix }}/archive/">Archive</a></li>
<li><a href="{{ site_prefix }}/about/">About</a></li>
<li><a href="{{ site_prefix }}">Home</a></li>
<li><a href="{{ site_prefix }}/posts.html">Archive</a></li>
<li><a href="{{ site_prefix }}/about.html">About</a></li>
</ul>
</div>
</div>
Expand Down
16 changes: 9 additions & 7 deletions templates/post.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{% extends "base.html" %}
{% block title %} {{ title }} {% endblock %}
{% block content %}
<h1>{{ title }} </h2>
<div class="post-meta">
<span class="post-date">Posted on {{ date }} </span>
</div>
<div class="post-content">
{{ content }}
<div class="post">
<h1>{{ title }} </h2>
<div class="post-meta">
<span class="post-date">Posted on {{ date }} </span>
</div>
<div class="post-content">
{{ content }}
</div>
</div>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'ashishdubeysblog'; // required: replace example with your forum shortname
var disqus_developer = 1
// var disqus_developer = 1

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
Expand Down

0 comments on commit 9a5dc46

Please sign in to comment.