mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-27 17:37:45 +01:00
15 lines
391 B
Python
15 lines
391 B
Python
import os
|
|
|
|
def create_nojekyll(app, env):
|
|
if app.builder.format == 'html':
|
|
path = os.path.join(app.builder.outdir, '.nojekyll')
|
|
open(path, 'wt').close()
|
|
|
|
path = os.path.join(app.builder.outdir, 'CNAME')
|
|
with open(path, 'wt') as f:
|
|
f.write(os.getenv('CNAME', 'esphomelib.com'))
|
|
|
|
|
|
def setup(app):
|
|
app.connect('env-updated', create_nojekyll)
|