From be4acd29aad6d1c97ab7ebf745ae8f53a3d1d580 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sun, 6 Jan 2019 20:32:11 +0100 Subject: [PATCH] Fix CNAME --- Dockerfile | 1 - conf.py | 1 + githubpages.py | 3 ++- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index dd97e3c54..8f807d381 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,6 @@ RUN pip3 install --no-cache-dir --no-binary :all: \ sphinx \ breathe -VOLUME /data/esphomedocs EXPOSE 8000 WORKDIR /data/esphomedocs diff --git a/conf.py b/conf.py index 4c951a65c..7271ce8e0 100644 --- a/conf.py +++ b/conf.py @@ -217,3 +217,4 @@ texinfo_documents = [ 'Miscellaneous'), ] linkcheck_ignore = [r'https://github.com/.*', r'https://discord.gg/.*'] +cname = os.getenv('CNAME', 'esphomelib.com') diff --git a/githubpages.py b/githubpages.py index 2ea6323c1..c3fb4f71c 100644 --- a/githubpages.py +++ b/githubpages.py @@ -7,8 +7,9 @@ def create_nojekyll(app, env): path = os.path.join(app.builder.outdir, 'CNAME') with open(path, 'wt') as f: - f.write(os.getenv('CNAME', 'esphomelib.com')) + f.write(app.env.config.cname) def setup(app): + app.add_config_value('cname', 'esphomelib.com', 'html') app.connect('env-updated', create_nojekyll)