Browse Source

check for siteurl override in environment

pull/1/head
Annika Backstrom 1 year ago
parent
commit
630771dc26
4 changed files with 6 additions and 2 deletions
  1. 1
    0
      .gitignore
  2. 1
    0
      docker-compose.yml
  3. 3
    1
      pelicanconf.py
  4. 1
    1
      publishconf.py

+ 1
- 0
.gitignore View File

@@ -1,5 +1,6 @@
1 1
 output/*
2 2
 cache
3 3
 *.pyc
4
+.env
4 5
 assets/css/main.css
5 6
 assets/css/main.css.map

+ 1
- 0
docker-compose.yml View File

@@ -4,6 +4,7 @@ services:
4 4
   pelican:
5 5
     build: .
6 6
     image: images.abackstrom.com/pelican
7
+    env_file: .env
7 8
     working_dir: /sixohthree.com
8 9
     volumes:
9 10
       - ./:/sixohthree.com

+ 3
- 1
pelicanconf.py View File

@@ -6,10 +6,12 @@ import calendar
6 6
 from subprocess import check_output
7 7
 from os.path import basename
8 8
 
9
+import os
10
+
9 11
 AUTHOR = u'Annika Backstrom'
10 12
 SITENAME = u'sixohthree.com'
11 13
 SITENAME_SHORT = u'603'
12
-SITEURL = '/'
14
+SITEURL = os.environ.get("PELICAN_SITEURL", "/")
13 15
 
14 16
 ENVIRONMENT = 'development'
15 17
 

+ 1
- 1
publishconf.py View File

@@ -5,7 +5,7 @@ import sys
5 5
 sys.path.append('.')
6 6
 from pelicanconf import *
7 7
 
8
-SITEURL = 'https://sixohthree.com'
8
+SITEURL = os.environ.get("PELICAN_SITEURL", "https://sixohthree.com")
9 9
 FEED_DOMAIN = SITEURL
10 10
 
11 11
 ENVIRONMENT = 'production'

Loading…
Cancel
Save