diff --git a/doc/_utils/utils.py b/doc/_utils/utils.py index d91b309ae76..4fe7c7eb208 100644 --- a/doc/_utils/utils.py +++ b/doc/_utils/utils.py @@ -128,3 +128,18 @@ def add_google_analytics(app: Sphinx, options: dict) -> None: options["add_gtm"] = True options["gtm_id"] = "GTM-WF4CVFX" + +def add_announcement_banner(options: dict) -> None: + """Add an announcement banner to the top of the page. + Args: + options: html theme options. + """ + + msg = "Important: We're excited to introduce our new technical documentation " \ + "platform docs.nordicsemi.com, " \ + "currently in Beta version. We invite you to explore it and share your feedback. " \ + "Read more on our " \ + "DevZone blog. " \ + + options["set_default_announcement"] = True + options["default_announcement_message"] = msg diff --git a/doc/kconfig/conf.py b/doc/kconfig/conf.py index e69b9edb7d9..89646115639 100644 --- a/doc/kconfig/conf.py +++ b/doc/kconfig/conf.py @@ -72,3 +72,4 @@ def setup(app): app.add_css_file("css/kconfig.css") utils.add_google_analytics(app, html_theme_options) + utils.add_announcement_banner(html_theme_options) diff --git a/doc/matter/conf.py b/doc/matter/conf.py index 8186404ed1a..dc226c2236c 100644 --- a/doc/matter/conf.py +++ b/doc/matter/conf.py @@ -71,3 +71,4 @@ def setup(app): app.add_css_file("css/matter.css") utils.add_google_analytics(app, html_theme_options) + utils.add_announcement_banner(html_theme_options) diff --git a/doc/mcuboot/conf.py b/doc/mcuboot/conf.py index 2f306aec172..138cc466f6b 100644 --- a/doc/mcuboot/conf.py +++ b/doc/mcuboot/conf.py @@ -90,3 +90,4 @@ def setup(app): utils.add_google_analytics(app, html_theme_options) + utils.add_announcement_banner(html_theme_options) diff --git a/doc/nrf/conf.py b/doc/nrf/conf.py index 65468f900cd..b95e329078e 100644 --- a/doc/nrf/conf.py +++ b/doc/nrf/conf.py @@ -226,3 +226,4 @@ def setup(app): app.add_css_file("css/nrf.css") utils.add_google_analytics(app, html_theme_options) + utils.add_announcement_banner(html_theme_options) diff --git a/doc/nrfx/conf.py b/doc/nrfx/conf.py index ebd22c058a8..a32833fb2e1 100644 --- a/doc/nrfx/conf.py +++ b/doc/nrfx/conf.py @@ -70,3 +70,4 @@ def setup(app): utils.add_google_analytics(app, html_theme_options) + utils.add_announcement_banner(html_theme_options) diff --git a/doc/nrfxlib/conf.py b/doc/nrfxlib/conf.py index 38f84250e01..1ade6460fd0 100644 --- a/doc/nrfxlib/conf.py +++ b/doc/nrfxlib/conf.py @@ -106,3 +106,4 @@ def setup(app): app.add_css_file("css/nrfxlib.css") utils.add_google_analytics(app, html_theme_options) + utils.add_announcement_banner(html_theme_options) diff --git a/doc/tfm/conf.py b/doc/tfm/conf.py index 09a175603dc..78b2f17a727 100644 --- a/doc/tfm/conf.py +++ b/doc/tfm/conf.py @@ -81,3 +81,4 @@ def setup(app): app.add_css_file("css/tfm.css") utils.add_google_analytics(app, html_theme_options) + utils.add_announcement_banner(html_theme_options) diff --git a/doc/zephyr/conf.py b/doc/zephyr/conf.py index 9bd73690cc7..1aaa8fa668e 100644 --- a/doc/zephyr/conf.py +++ b/doc/zephyr/conf.py @@ -82,3 +82,4 @@ def setup(app): app.add_css_file("css/zephyr.css") utils.add_google_analytics(app, html_theme_options) + utils.add_announcement_banner(html_theme_options)