aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2021-10-09 09:19:44 -0400
committerRob Austein <sra@hactrn.net>2021-10-09 09:19:44 -0400
commitfc6e9f350c557560b335100db01ab498b29638e4 (patch)
tree2ba1433639fccdca41b657f58ffdea98679e8eae
parentc9b3a3ad053fe73f4eb0c9605f508392e57e7232 (diff)
Autoconfigure "development mode" in pelican config file
-rw-r--r--pelicanconf.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/pelicanconf.py b/pelicanconf.py
index 3f042a9..935b531 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -1,6 +1,18 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
+from os import getenv
+
+if getenv("CRYPTECH_WIKI_PRODUCTION_BUILD"):
+ SITEURL = "https://wiki.cryptech.is/"
+ RELATIVE_URLS = False
+
+else:
+ SITEURL = ""
+ RELATIVE_URLS = True
+
+del getenv
+
AUTHOR = "Cryptech Core Team"
SITENAME = "Cryptech Project"
@@ -8,16 +20,6 @@ PATH = "content"
TIMEZONE = "UTC"
DEFAULT_LANG = "en"
-CRYPTECH_DEV_MODE = False
-
-if CRYPTECH_DEV_MODE:
- SITEURL = ""
- RELATIVE_URLS = True
-
-else:
- SITEURL = "https://wiki.cryptech.is/"
- RELATIVE_URLS = False
-
# Feed generation is usually not desired when developing
#FEED_ALL_ATOM = None
#CATEGORY_FEED_ATOM = None