aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Brattlof <bryanbrattlof@gmail.com>2019-09-12 20:31:52 -0500
committerBryan Brattlof <bryanbrattlof@gmail.com>2019-09-12 21:02:08 -0500
commitf5f58bd46103ff8cee9795be3c9aa52619cdc7c1 (patch)
tree2713dc52e3902757f39cd346ad7db28967ed91c7
parentf4c26e39cf23fbd3337fe1eecbdb53b7aaa13477 (diff)
downloadbryanbrattlof.com-f5f58bd46103ff8cee9795be3c9aa52619cdc7c1.tar.gz
bryanbrattlof.com-f5f58bd46103ff8cee9795be3c9aa52619cdc7c1.tar.bz2
add requirements and democonf
-rw-r--r--democonf.py101
-rw-r--r--requirements.txt3
2 files changed, 104 insertions, 0 deletions
diff --git a/democonf.py b/democonf.py
new file mode 100644
index 0000000..c605b6d
--- /dev/null
+++ b/democonf.py
@@ -0,0 +1,101 @@
+import os.path
+
+
+THEME_STATIC_DIR = 'theme'
+
+
+################
+# Page Paths
+################
+
+DIRECT_TEMPLATES = [
+ 'index',
+ 'ubad', # 404 page
+ 'sitemap', # sitemap.xml
+]
+
+# root file
+INDEX_URL = ''
+INDEX_SAVE_AS = 'index.html'
+
+# sitemap.xml
+SITEMAP_URL = 'sitemap.xml'
+SITEMAP_SAVE_AS = 'sitemap.xml'
+
+# 404 page
+UBAD_URL = '404/'
+UBAD_SAVE_AS = UBAD_URL + 'index.html'
+
+# page & page drafts
+DRAFT_PAGE_URL = PAGE_URL = '{slug}/'
+DRAFT_PAGE_SAVE_AS = PAGE_SAVE_AS = DRAFT_PAGE_URL + 'index.html'
+
+# article & article drafts
+DRAFT_URL = ARTICLE_URL = '{slug}/'
+DRAFT_SAVE_AS = ARTICLE_SAVE_AS = DRAFT_URL + 'index.html'
+
+
+################
+# Footer
+################
+
+LOGO_IMAGE = os.path.join(THEME_STATIC_DIR, 'img', 'logo.png')
+
+LINKS = (
+ ('Home', ''),
+ ('About', PAGE_URL.format(slug='hi')),
+ ('Connect', PAGE_URL.format(slug='connect')),
+ ('Support', PAGE_URL.format(slug='support')),
+)
+
+LICENSE = (
+ 'Creative Commons Attribution ShareAlike 4.0 International License.',
+ 'https://creativecommons.org/licenses/by-sa/4.0/',
+)
+
+
+################
+# Plugins
+################
+PLUGINS = ['pelican_webassets', 'pelican_htmlmin']
+
+WEBASSETS_SOURCE_PATHS = ['stylesheets']
+WEBASSETS_BUNDLES = (
+ (
+ 'articles_css', (
+ 'article.scss',
+ ), {
+ 'output': 'css/article.css',
+ 'filters': [
+ 'libsass',
+ ]
+ }
+ ), (
+ 'indexes_css', (
+ 'index.scss',
+ ), {
+ 'output': 'css/index.css',
+ 'filters': [
+ 'libsass',
+ ]
+ }
+ ), (
+ '404_css', (
+ 'ubad.scss',
+ ), {
+ 'output': 'css/404.css',
+ 'filters': [
+ 'libsass',
+ ]
+ }
+ ),
+)
+WEBASSETS_CONFIG = (
+ ('libsass_style', 'compressed'),
+)
+
+HTMLMIN_OPTIONS = {
+ 'remove_comments': True,
+ 'remove_all_empty_space': True,
+ 'remove_optional_attribute_quotes': True
+}
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..cf67638
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+pelican-webassets
+pelican-htmlmin
+libsass