Skip to content
Browse files

Adds Disqus comments service

  • Loading branch information...
1 parent 4f4a034 commit 9a5dc46dd948f0e216081a7220971fc742b944c2 @dash1291 committed
Showing with 23 additions and 18 deletions.
  1. +2 −2 build.py
  2. BIN static/.style.css.swp
  3. +9 −6 static/style.css
  4. +3 −3 templates/base.html
  5. +9 −7 templates/post.html
View
4 build.py
@@ -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:]:
@@ -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')
View
BIN static/.style.css.swp
Binary file not shown.
View
15 static/style.css
@@ -10,6 +10,7 @@ body {
font-family: "Palatino";
color: #666633;
font-size: 24pt;
+ clear: both;
}
a {
@@ -28,8 +29,6 @@ a:hover {
}
#footer {
- position: absolute;
- bottom: 0px;
}
#nav {
@@ -58,10 +57,6 @@ a:hover {
color: black;
}
-#content {
- clear:both;
-}
-
.post-item {
margin-bottom: 20px;
clear: both;
@@ -76,3 +71,11 @@ a:hover {
font-size: 16pt;
margin-right: 20px;
}
+
+.post h1 {
+ margin-bottom:5px;
+}
+
+.post-meta {
+ margin-bottom:20px;
+}
View
6 templates/base.html
@@ -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>
View
16 templates/post.html
@@ -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() {

0 comments on commit 9a5dc46

Please sign in to comment.
Something went wrong with that request. Please try again.