diff --git a/docs/en/conf.py b/docs/en/conf.py index 85998bcdf5..35de41620a 100644 --- a/docs/en/conf.py +++ b/docs/en/conf.py @@ -29,4 +29,7 @@ language = 'en' html_zip = f'esp-idf-{language}-{release}' # noqa: F405 -html_js_files = ['js/chatbot_widget_en.js'] +# The chatbot is able to answer only about the latest documentation. +# Enable Documentation Chatbot widget only for the master branch. +if release == 'latest': # noqa: F405 + html_js_files = ['js/chatbot_widget_en.js'] diff --git a/docs/zh_CN/conf.py b/docs/zh_CN/conf.py index 3935958e0c..73100f2841 100644 --- a/docs/zh_CN/conf.py +++ b/docs/zh_CN/conf.py @@ -29,4 +29,7 @@ language = 'zh_CN' html_zip = f'esp-idf-{language}-{release}' # noqa: F405 -html_js_files = ['js/chatbot_widget_cn.js'] +# The chatbot is able to answer only about the latest documentation. +# Enable Documentation Chatbot widget only for the master branch. +if release == 'latest': # noqa: F405 + html_js_files = ['js/chatbot_widget_cn.js']