vanity_press/settings.py

34 lines
1.3 KiB
Python

SOURCE_DIR = "./" #replace with whatever folder you write your content in
DEST_DIR = "/var/gemini/" #where the output folder is
TEMPLATE_DIR = "./templates/" #where you store templates
TEMPLATE_EXTENSIONS = ["gmi", "gemini", "xml", "html"]
#^dynamic modifications (including tempalting) will be applied only to files with these extensions
IGNORE_PREFIX = '_'
#^folders starting with this string and all of their contents will not be added to the site
#files, however, WILL be added but won't show up in variables like {{ index }} or {{ atom }}
'''
from datetime import datetime
def my_custom_function(format="%Y-%m-%d"):
return datetime.now().strftime(format)
'''
#^example of creating a function
replace_table = {
'site_name': "Your Gemlog",
'site_url': 'gemini://your_url.com',
'author': 'You',
'email': 'email@email.com',
#^these values are used to genereate atom feeds these are optional. deleting these rows will just cause
#some info in the atom feed to be missing, but everything should still work
#you can also use these variables on your pages like so:
#lorem ipsum dolor asset
#article written by {{ author }}
#email me at {{ email }}
#'my_custom_function': lambda args: my_custom_function(*args),
#^example of creating a new function
}