From fc6e9f350c557560b335100db01ab498b29638e4 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sat, 9 Oct 2021 09:19:44 -0400 Subject: Autoconfigure "development mode" in pelican config file --- pelicanconf.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'pelicanconf.py') 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 -- cgit v1.2.3