X-Git-Url: https://git.llucax.com/software/blitiri.git/blobdiff_plain/72a7e1dd08a61f423fd2356a022f932777468f9a..0d3e028e524ed830f74ad82b2ac5e12b7a23ce07:/config.py.sample diff --git a/config.py.sample b/config.py.sample index 79efac7..5a07da7 100644 --- a/config.py.sample +++ b/config.py.sample @@ -20,8 +20,11 @@ comments_path = "/tmp/blog/comments" # default templates. If they're not found, the built-in ones will be used. templates_path = "/tmp/blog/templates" -# Path where the cache is stored (must be writeable by the web server) -cache_path = "/tmp/blog/cache" +# Path where the cache is stored (must be writeable by the web server); +# set to None to disable. When enabled, you must take care of cleaning it up +# every once in a while. +#cache_path = "/tmp/blog/cache" +cache_path = None # URL to the blog, including the name. Can be a full URL or just the path. blog_url = "/blog/blitiri.cgi" @@ -39,47 +42,11 @@ author = "Hartmut Kegan" # Article encoding encoding = "utf8" -# You can customize the captcha engine by providing a Captcha class with this -# interface: -# Constructor: -# Captcha(article) -> constructor, takes an article[1] as argument -# Attributes: -# puzzle -> a string with the puzzle the user must solve to prove he is -# not a bot (can be raw HTML) -# help -> a string with extra instructions, shown only when the user -# failed to solve the puzzle -# Methods: -# validate(form_data) -> based on the form data[2], returns True if -# the user has solved the puzzle uccessfully -# (False otherwise). -# -# Note you must ensure that the puzzle attribute and validate() method can -# "communicate" because they are executed in different requests. You can pass a -# cookie or just calculate the answer based on the article's data, for example. -# -# Example: a captcha class to completely disable the captcha feature -# class Captcha (object): -# def __init__(self, article): -# self.puzzle = '' -# self.help = '' -# def validate(form_data): -# return True -# Remove the captcha input field from the form template, and that's it! -# -# [1] article is an object with all the article's information: -# path -> string -# created -> datetime -# updated -> datetime -# uuid -> string (unique ID) -# title -> string -# author -> string -# tags -> list of strings -# raw_contents -> string in rst format -# comments -> list of Comment objects (not too relevant here) -# [2] form_data is an object with the form fields (all strings): -# author, author_error -# link, link_error -# catpcha, captcha_error -# body, body_error -# action, method +# Captcha method to use. At the moment only "title" is supported, but if you +# are keen with Python you can provide your own implementation, see +# blitiri.cgi for details. +captcha_method = "title" + +# How many articles to show in the index +index_articles = 10