From 70d565ddbba66b4006f719c96ede2f06d645fe9e Mon Sep 17 00:00:00 2001 From: Krzysztof Date: Tue, 29 Apr 2025 15:24:16 +0800 Subject: [PATCH] change(docs): Enable Documentation Chatbot only for the master branch --- docs/en/conf.py | 5 ++++- docs/zh_CN/conf.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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']