Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add Zoomin info banner to doc #12381

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading