Skip to content

Commit

Permalink
Merge pull request #206 from lawruble13/banner
Browse files Browse the repository at this point in the history
Add announcement banner
  • Loading branch information
saadrahim authored May 24, 2023
2 parents ab04f88 + e88d6d4 commit ee70a0b
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/rocm_docs/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
from rocm_docs import util


def _update_repo_opts(
srcdir: str, theme_opts: Dict[str, Any]
) -> None:
def _update_repo_opts(srcdir: str, theme_opts: Dict[str, Any]) -> None:
url, branch = util.get_branch(srcdir)
default_branch_options = {
"use_edit_page_button": False,
Expand All @@ -34,11 +32,20 @@ def _update_theme_options(app: Sphinx) -> None:
["components/toggle-primary-sidebar.html", "breadcrumbs.html"],
)

theme_opts.setdefault(
"announcement",
(
"ROCm Documentation is transitioning to this site. For the legacy"
" documentation, please visit <a"
" href='https://docs.amd.com'>docs.amd.com</a>. For more"
" information about this documentation transition, please see <a"
" href='#'>our announcement</a>."
),
)

# Default the download, edit, and fullscreen buttons to off
for button in ["download", "edit_page", "fullscreen"]:
theme_opts.setdefault(
f"use_{button}_button", False
)
theme_opts.setdefault(f"use_{button}_button", False)

default_config_opts = {
"html_show_sphinx": False,
Expand Down

0 comments on commit ee70a0b

Please sign in to comment.