Skip to content

Commit

Permalink
doc: add Zoomin info banner to doc
Browse files Browse the repository at this point in the history
Add a banner on top informing about the transition to the
Zoomin documentation platform.

Signed-off-by: Bartosz Gentkowski <[email protected]>
  • Loading branch information
b-gent authored and rlubos committed Oct 5, 2023
1 parent 1226be9 commit d0e6d51
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<b>Important: </b>We're excited to introduce our new technical documentation " \
"platform <a href=\"https://docs.nordicsemi.com/\">docs.nordicsemi.com</a>, " \
"currently in Beta version. We invite you to explore it and share your feedback. " \
"Read more on our " \
"<a href=\"https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/introducing-the-unified-documentation-portal/\">DevZone blog</a>. " \

options["set_default_announcement"] = True
options["default_announcement_message"] = msg
1 change: 1 addition & 0 deletions doc/kconfig/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions doc/matter/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions doc/mcuboot/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,4 @@

def setup(app):
utils.add_google_analytics(app, html_theme_options)
utils.add_announcement_banner(html_theme_options)
1 change: 1 addition & 0 deletions doc/nrf/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions doc/nrfx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@

def setup(app):
utils.add_google_analytics(app, html_theme_options)
utils.add_announcement_banner(html_theme_options)
1 change: 1 addition & 0 deletions doc/nrfxlib/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions doc/tfm/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions doc/zephyr/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit d0e6d51

Please sign in to comment.