X-Git-Url: https://git.llucax.com/software/blitiri.git/blobdiff_plain/1ed8b3ab6ffa91ec28028bd442403d6f632970a7..a5749f095f091ee8af98d0a92abea8276d1001e4:/blitiri.cgi diff --git a/blitiri.cgi b/blitiri.cgi index f08247e..11a7df8 100755 --- a/blitiri.cgi +++ b/blitiri.cgi @@ -14,6 +14,9 @@ # Directory where entries are stored data_path = "/tmp/blog/data" +# Directory where comments are stored (must be writeable by the web server) +comments_path = "/tmp/blog/comments" + # Path where templates are stored. Use an empty string for the built-in # default templates. If they're not found, the built-in ones will be used. templates_path = "/tmp/blog/templates" @@ -50,6 +53,9 @@ import urllib import cgi from docutils.core import publish_parts +# Before importing the config, add our cwd to the Python path +sys.path.append(os.getcwd()) + # Load the config file, if there is one try: from config import * @@ -57,17 +63,22 @@ except: pass +# Pimp *_path config variables to support relative paths +data_path = os.path.realpath(data_path) +templates_path = os.path.realpath(templates_path) + # Default template -default_main_header = """ - +default_main_header = """\ + + - + - + %(title)s @@ -79,8 +90,7 @@ default_main_header = """ """ default_main_footer = """ -

-



+