[Cryptech-Commits] [user/sra/pelican] branch pelican updated: Fiddle a few settings for public view

git at cryptech.is git at cryptech.is
Sun Jul 25 19:32:23 UTC 2021


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

sra at hactrn.net pushed a commit to branch pelican
in repository user/sra/pelican.

The following commit(s) were added to refs/heads/pelican by this push:
     new b11298b  Fiddle a few settings for public view
b11298b is described below

commit b11298b250f63daf091591d1638608325f766d9a
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Sun Jul 25 19:30:42 2021 +0000

    Fiddle a few settings for public view
    
    Current publication location wiki.cryptech.is/pelican requires
    minor fiddling with URLs slightly, which will need fiddling again
    if we adopt this for real
---
 pelicanconf.py | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/pelicanconf.py b/pelicanconf.py
index e968ae3..45c7e53 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -8,9 +8,15 @@ PATH = "content"
 TIMEZONE = "UTC"
 DEFAULT_LANG = "en"
 
-SITEURL = ""
+CRYPTECH_DEV_MODE = True
 
-RELATIVE_URLS = True
+if CRYPTECH_DEV_MODE:
+    SITEURL = ""
+    RELATIVE_URLS = True
+    
+else:
+    SITEURL = "https://trac.cryptech.is/pelican/"
+    RELATIVE_URLS = False
 
 # Feed generation is usually not desired when developing
 #FEED_ALL_ATOM = None
@@ -22,6 +28,7 @@ RELATIVE_URLS = True
 DEFAULT_PAGINATION = 10
 
 THEME = "../m.css/pelican-theme"
+
 THEME_STATIC_DIR = "static"
 
 #DIRECT_TEMPLATES = ["index"]
@@ -35,7 +42,14 @@ M_LINKS_NAVBAR1 = [
     ("Archives", "archives.html", "archives", []),
 ]
 
-M_CSS_FILES = ["https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600", "/static/m-dark.css"]
+M_CSS_FILES = [
+    ("https://fonts.googleapis.com/css"
+     "?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600"),
+
+    ("/static/m-dark.css"
+     if CRYPTECH_DEV_MODE else
+     "/pelican/static/m-dark.css")
+]
 
 M_HIDE_ARTICLE_SUMMARY = True
 

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


More information about the Commits mailing list