mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-12 20:10:50 +01:00
Update sitemap.py
This commit is contained in:
parent
942615c34a
commit
837de9c131
@ -39,6 +39,9 @@ def create_sitemap(app, exception):
|
||||
encoding='utf-8',
|
||||
method="xml")
|
||||
|
||||
if os.getenv('PRODUCTION') != 'YES':
|
||||
with open(os.path.join(app.builder.outdir, 'robots.txt'), 'wt') as f:
|
||||
with open(os.path.join(app.builder.outdir, 'robots.txt'), 'wt') as f:
|
||||
if os.getenv('PRODUCTION') != 'YES':
|
||||
f.write('User-agent: *\nDisallow: /\n')
|
||||
else:
|
||||
f.write('User-agent: *\nDisallow: \n\n'
|
||||
'Sitemap: https://esphome.io/sitemap.xml\n')
|
||||
|
Loading…
Reference in New Issue
Block a user