point dev docs to next url

This commit is contained in:
Guillermo Ruffino 2020-07-10 18:55:16 -03:00
parent d4e76185bd
commit 45f6926a5a

View File

@ -100,9 +100,15 @@ cookie_authenticated_yes = b'yes'
def template_args(): def template_args():
version = const.__version__ version = const.__version__
if 'b' in version:
docs_link = 'https://beta.esphome.io/'
elif 'dev' in version:
docs_link = 'https://next.esphome.io/'
else:
docs_link = 'https://www.esphome.io/'
return { return {
'version': version, 'version': version,
'docs_link': 'https://beta.esphome.io/' if 'b' in version else 'https://esphome.io/', 'docs_link': docs_link,
'get_static_file_url': get_static_file_url, 'get_static_file_url': get_static_file_url,
'relative_url': settings.relative_url, 'relative_url': settings.relative_url,
'streamer_mode': get_bool_env('ESPHOME_STREAMER_MODE'), 'streamer_mode': get_bool_env('ESPHOME_STREAMER_MODE'),