Fix CNAME

This commit is contained in:
Otto Winter 2019-01-06 20:32:11 +01:00
parent 3763c08c0d
commit be4acd29aa
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
3 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,6 @@ RUN pip3 install --no-cache-dir --no-binary :all: \
sphinx \ sphinx \
breathe breathe
VOLUME /data/esphomedocs
EXPOSE 8000 EXPOSE 8000
WORKDIR /data/esphomedocs WORKDIR /data/esphomedocs

View File

@ -217,3 +217,4 @@ texinfo_documents = [
'Miscellaneous'), 'Miscellaneous'),
] ]
linkcheck_ignore = [r'https://github.com/.*', r'https://discord.gg/.*'] linkcheck_ignore = [r'https://github.com/.*', r'https://discord.gg/.*']
cname = os.getenv('CNAME', 'esphomelib.com')

View File

@ -7,8 +7,9 @@ def create_nojekyll(app, env):
path = os.path.join(app.builder.outdir, 'CNAME') path = os.path.join(app.builder.outdir, 'CNAME')
with open(path, 'wt') as f: with open(path, 'wt') as f:
f.write(os.getenv('CNAME', 'esphomelib.com')) f.write(app.env.config.cname)
def setup(app): def setup(app):
app.add_config_value('cname', 'esphomelib.com', 'html')
app.connect('env-updated', create_nojekyll) app.connect('env-updated', create_nojekyll)