diff --git a/.circleci/config.yml b/.circleci/config.yml
index a64c594..89a2fc5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -20,11 +20,13 @@ jobs:
export BUCKET="offen-dev-production"
export DISTRIBUTION="E2UP8XHLFOC3QC"
export ROBOTS_FILE="robots.txt.production"
+ export OFFEN_ACCOUNT_ID="5ec8345a-2a45-4eb9-92e5-8d9e5684db58"
else
export SITEURL="https://staging.offen.dev"
export BUCKET="offen-dev-staging"
export DISTRIBUTION="E13I20LK8ASYFH"
export ROBOTS_FILE="robots.txt.staging"
+ export OFFEN_ACCOUNT_ID="8f7ee44a-4cd8-47f2-a77e-8c7c98d46b89"
fi
make build
aws s3 sync --delete ./output/. s3://$BUCKET
diff --git a/Makefile b/Makefile
index ff62038..b3069c0 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ ROBOTS_FILE ?= robots.txt.staging
SITEURL ?= http://localhost:8000
build:
- @docker build --build-arg siteurl=${SITEURL} -t offen/website -f build/Dockerfile .
+ @docker build --build-arg siteurl=${SITEURL} --build-arg offenaccountid=${OFFEN_ACCOUNT_ID} -t offen/website -f build/Dockerfile .
@rm -rf output && mkdir output
@docker create --entrypoint=bash -it --name assets offen/website
@docker cp assets:/code/homepage/output/. ./output/
diff --git a/build/Dockerfile b/build/Dockerfile
index 518c59e..c82a961 100644
--- a/build/Dockerfile
+++ b/build/Dockerfile
@@ -5,6 +5,8 @@ ENV NODE_PATH="/usr/lib/node_modules"
ARG siteurl
ENV SITEURL=$siteurl
+ARG offenaccountid
+ENV OFFEN_ACCOUNT_ID=$offenaccountid
RUN npm install -g postcss-cli@^6.1.3 autoprefixer@^9.7.0 svgo@^1.3.0
RUN apt-get update \
diff --git a/homepage/pelicanconf.py b/homepage/pelicanconf.py
index bdae281..65fc504 100644
--- a/homepage/pelicanconf.py
+++ b/homepage/pelicanconf.py
@@ -1,3 +1,4 @@
+import os
from datetime import datetime
from calendar import month_name
# If your site is available via HTTPS, make sure SITEURL begins with https://
@@ -69,4 +70,4 @@ PATREON_URL = 'https://www.patreon.com/offen'
LINKEDIN_URL = 'https://www.linkedin.com/company/hioffen'
TWITTER_URL = 'https://twitter.com/hioffen'
-# OFFEN_ACCOUNT_ID = '9b63c4d8-65c0-438c-9d30-cc4b01173393'
+OFFEN_ACCOUNT_ID = os.environ.get('OFFEN_ACCOUNT_ID', None)
diff --git a/homepage/publishconf.py b/homepage/publishconf.py
index 11d3de2..17a1e20 100644
--- a/homepage/publishconf.py
+++ b/homepage/publishconf.py
@@ -15,5 +15,3 @@ FEED_ALL_ATOM = 'feeds/all.atom.xml'
DELETE_OUTPUT_DIRECTORY = True
PLUGINS += ['optimize_images']
-
-# OFFEN_ACCOUNT_ID = '5ec8345a-2a45-4eb9-92e5-8d9e5684db58'
diff --git a/homepage/theme/templates/base.html b/homepage/theme/templates/base.html
index a78e818..0ccd272 100644
--- a/homepage/theme/templates/base.html
+++ b/homepage/theme/templates/base.html
@@ -28,7 +28,7 @@
{% if OFFEN_ACCOUNT_ID and not no_stats %}
-
+
{% endif %}
{% endblock %}