forked from sjl/stevelosh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
114 lines (94 loc) · 3.3 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import os
ROOT_PATH = os.path.abspath(os.path.dirname(__file__))
import hydeengine
HYDE_FOLDER = os.path.dirname(os.path.dirname(hydeengine.__file__))
LAYOUT_DIR = os.path.join(ROOT_PATH, 'layout')
CONTENT_DIR = os.path.join(ROOT_PATH, 'content')
MEDIA_DIR = os.path.join(ROOT_PATH, 'media')
DEPLOY_DIR = os.path.join(ROOT_PATH, 'deploy')
TMP_DIR = os.path.join(ROOT_PATH, 'deploy_tmp')
BACKUPS_DIR = os.path.join(ROOT_PATH, 'backups')
BACKUP = False
DEBUG = True
SITE_ROOT = "/"
SITE_WWW_URL = "http://carlhu.com"
SITE_NAME = "Carl Hu"
SITE_AUTHOR = "Carl Hu"
GENERATE_ABSOLUTE_FS_URLS = False
GENERATE_CLEAN_URLS = True
LISTING_PAGE_NAMES = ['index']
APPEND_SLASH = True
# {folder : extension : (processors)}
# The processors are run in the given order and are chained.
# Only a lone * is supported as an indicator for folders. Path
# should be specified. No wildcard card support yet.
# Starting under the media folder. For example, if you have media/css under
# your site root,you should specify just css. If you have media/css/ie you
# should specify css/ie for the folder name. css/* is not supported (yet).
# Extensions do not support wildcards.
MEDIA_PROCESSORS = {
'*': {
'.less': ('hydeengine.media_processors.LessCSS',),
'.js': ('hydeengine.media_processors.TemplateProcessor',
'hydeengine.media_processors.YUICompressor',)
},
'images/': {
'.png': ('hydeengine.media_processors.Thumbnail',),
'.jpg': ('hydeengine.media_processors.Thumbnail',),
}
}
CONTENT_PROCESSORS = {}
SITE_PRE_PROCESSORS = {
'/': {
'hydeengine.site_pre_processors.NodeInjector' : {
'variable': 'blog_node',
'path': 'content/blog',
}
}
}
SITE_POST_PROCESSORS = {
# 'media/js': {
# 'hydeengine.site_post_processors.FolderFlattener' : {
# 'remove_processed_folders': True,
# 'pattern':"*.js"
# }
# }
}
CONTEXT = {
'GENERATE_CLEAN_URLS': GENERATE_CLEAN_URLS,
'links': {
'python': 'http://python.org/',
'django': 'http://www.djangoproject.com/',
'cherrypy': 'http://cherrypy.org/',
'hyde': 'http://github.com/lakshmivyas/hyde/',
'markdown': 'http://daringfireball.net/projects/markdown/',
'fabric': 'http://fabfile.org/',
'blatter': 'http://bitbucket.org/jek/blatter/',
'webfaction': 'http://www.webfaction.com?affiliate=sjl',
'mercurial': 'http://mercurial.selenic.com/',
'git': 'http://git-scm.com/',
'aardvarklegs': 'http://fecklessmind.com/2009/01/20/aardvark-css-framework/',
'hgtip': 'http://hgtip.com/',
'lesscss': 'http://lesscss.org/',
'bitbucket': 'http://bitbucket.org/',
'github': 'http://github.com/',
'twsl': 'http://twitter.com/stevelosh/',
},
}
FILTER = {
'include': (".htaccess",),
'exclude': (".*","*~")
}
# Processor Configuration
YUI_COMPRESSOR = os.path.join(ROOT_PATH, 'yuicompressor-2.4.2.jar')
HSS_PATH = None # if you don't want to use HSS
LESS_CSS_PATH = '/usr/local/bin/lessc'
THUMBNAIL_MAX_WIDTH = 1400000000
THUMBNAIL_MAX_HEIGHT = 100
THUMBNAIL_FILENAME_POSTFIX = '-thumb'
# Django settings
TEMPLATE_DIRS = (LAYOUT_DIR, CONTENT_DIR, TMP_DIR, MEDIA_DIR)
INSTALLED_APPS = (
'hydeengine',
'django.contrib.webdesign',
)