diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2014-10-15 22:50:05 +0200 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2014-10-15 21:59:39 +0100 |
commit | 068b4517ac81c5a128a26ec10153019f1497a2a4 (patch) | |
tree | 5df5962154c8af595ea5469c1eb930cebb132976 | |
parent | 8d6b446e48a3fd82cca741644d4b9e53c72c0ebf (diff) | |
download | website-068b4517ac81c5a128a26ec10153019f1497a2a4.tar.xz |
move isso.css to journal subdir, use glob.glob instead of listdir
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | scripts/bupa | 8 | ||||
-rw-r--r-- | src/journal/isso.css (renamed from src/isso.css) | 0 | ||||
-rw-r--r-- | src/templates/entry.html | 2 |
4 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ HTML := index.html journal.html about.html -CSS := style.css isso.css +CSS := style.css journal/isso.css RESOURCES := glider.png FILES := $(HTML) $(CSS) sitemap.xml pgp-key.txt \ diff --git a/scripts/bupa b/scripts/bupa index 0ed31e6..d0630f5 100755 --- a/scripts/bupa +++ b/scripts/bupa @@ -5,7 +5,7 @@ Options: -h --help Show this screen. """ from jinja2 import Environment, FileSystemLoader -import os, yaml, docopt +import glob, yaml, docopt from docutils import core from docutils.writers.html4css1 import Writer @@ -48,14 +48,14 @@ def parse(filename): def build_journal(env): template = env.get_template('journal.html') entry_tmpl = env.get_template('entry.html') - files = os.listdir('src/journal') + files = glob.glob('src/journal/*.rst') files.sort(key=filename_to_id, reverse=True) entries = [] for file in files: - entry = parse('src/journal/' + file) + entry = parse(file) entry.id = filename_to_id(file) - entry.page = 'journal/' + file.split('.', 1)[0] + '.html' + entry.page = file.split('/', 1)[1].split('.', 1)[0] + '.html' entry.body = reST_to_html(entry.body) entries += [entry] with open('build/'+entry.page, 'w') as file: diff --git a/src/isso.css b/src/journal/isso.css index bd880dd..bd880dd 100644 --- a/src/isso.css +++ b/src/journal/isso.css diff --git a/src/templates/entry.html b/src/templates/entry.html index 1988537..1f23123 100644 --- a/src/templates/entry.html +++ b/src/templates/entry.html @@ -1,7 +1,7 @@ {% extends 'layout.html' %} {% block head %} - <link href="/~kyrias/isso.css" rel="stylesheet"> + <link href="isso.css" rel="stylesheet"> {% endblock head %} {% block content %} |