[Cryptech-Commits] [wiki] branch production updated: Autoconfigure "development mode" in pelican config file

git at cryptech.is git at cryptech.is
Sat Oct 9 13:23:32 UTC 2021


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch production
in repository wiki.

The following commit(s) were added to refs/heads/production by this push:
     new fc6e9f3  Autoconfigure "development mode" in pelican config file
fc6e9f3 is described below

commit fc6e9f350c557560b335100db01ab498b29638e4
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Sat Oct 9 09:19:44 2021 -0400

    Autoconfigure "development mode" in pelican config file
---
 pelicanconf.py | 22 ++++++++++++----------
 1 file 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list