Skip to content

Commit d6c3c2b

Browse files
author
ckunte
committed
template add/update.
1 parent 55c9bdc commit d6c3c2b

14 files changed

Lines changed: 200 additions & 7 deletions

File tree

README.md

100644100755
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ This fork includes the following additions and enhancements:
1111
- Supports clean URLs.
1212
- Works just fine with [MathJax][mj] for rendering using [LaTeX][tx] (math syntax). (Just remember to use `\newline` for multiple lines instead of `\n`.)
1313

14+
## Example blog
15+
16+
- [ckunte.net/log](http://ckunte.net/log/)
17+
1418
## What it does not do
1519

1620
Chisel keeps it simple and stupid. And so, there is

chisel.py

100644100755
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
# /antinode (the generated html site from post files)
2929
# the locations are used thus:
3030
#
31-
BASEURL = "http://yoursiteurl.ext/" #end with slash
31+
BASEURL = "http://ckunte.net/log/" #end with slash
3232
# The following tells chisel where to look for native posts:
33-
SOURCE = "../posts/" #end with slash
33+
SOURCE = "/Users/ckunte/Sites/posts/" #end with slash
3434
# The following tells chisel where to generate site:
35-
DESTINATION = "../yoursiteurl.ext/" #end with slash
35+
DESTINATION = "/Users/ckunte/Sites/ckunte.github.io/log/" #end with slash
3636
HOME_SHOW = 3 #numer of entries to show on homepage
37-
TEMPLATE_PATH = "./templates/"
37+
TEMPLATE_PATH = "/Users/ckunte/Sites/chisel/themevanilla/" #end with slash
3838
TEMPLATE_OPTIONS = {}
3939
TEMPLATES = {
4040
'home': "home.html",
@@ -43,7 +43,7 @@
4343
'colophon': "colophon.html",
4444
'404': "404.html",
4545
}
46-
TIME_FORMAT = "%b %d, %Y"
46+
TIME_FORMAT = "%B %d, %Y"
4747
ENTRY_TIME_FORMAT = "%m/%d/%Y"
4848
#FORMAT should be a callable that takes in text
4949
#and returns formatted text
@@ -55,9 +55,9 @@
5555
# set PATHEXT = "" if URLEXT = ".html" and vice versa.
5656
PATHEXT = ".html"
5757
RSS = PyRSS2Gen.RSS2(
58-
title = "Site title",
58+
title = "ckunte.net log",
5959
link = BASEURL + "rss.xml",
60-
description = "Description of site.",
60+
description = "Journal by Chyetanya Kunte.",
6161
lastBuildDate = datetime.datetime.now(),
6262
items = [])
6363
#########
File renamed without changes.

themevanilla/404.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% extends "base.html" %}
2+
{%- block title -%}: Not found{%- endblock %}
3+
4+
{%- block header -%}
5+
{%- endblock -%}
6+
7+
{%- block post -%}
8+
<div class="post">
9+
<h2>404: Page not found</h2>
10+
<p>The page you requested does not exist. Try the <a href="/log/archive">archive</a>.</p>
11+
</div>
12+
{%- endblock %}

themevanilla/archive.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{% extends "base.html" %}
2+
{%- block title -%}: Archive{%- endblock %}
3+
4+
{%- block header -%}
5+
{%- endblock %}
6+
7+
{%- block post %}
8+
<div class="post">
9+
<h2>Archive</h2>
10+
<p><img src="/log/images/streetview-near-pantheon.jpg"></p>
11+
<p>There are {{ entries|length }} posts in this archive.</p>
12+
13+
{%- for year, year_list in entries|groupby('year')|reverse -%}
14+
<h3><small>{{ year }}</small></h3>
15+
<ul class="archive">
16+
{%- for month, month_list in year_list|groupby('month')|reverse -%}
17+
{%- for day, day_list in month_list|groupby('day')|reverse -%}
18+
{%- for entry in day_list -%}
19+
<li class="list"><a href="/log/{{ entry.url }}">{{ entry.title }}</a>&nbsp;<small>in&nbsp;{{ entry.content|wordcount }} words&nbsp;&ndash;&nbsp;{{ entry.pretty_date }}</small></li>
20+
{%- endfor %}
21+
{%- endfor %}
22+
{%- endfor %}
23+
</ul>
24+
{%- endfor %}
25+
</div>
26+
{%- endblock %}

0 commit comments

Comments
 (0)