Skip to content

Commit

Permalink
docs: Add "this is the unstable docs" banner
Browse files Browse the repository at this point in the history
  • Loading branch information
alcarney committed Jul 1, 2023
1 parent c2b4e84 commit 963d1ca
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from docutils import nodes # noqa: E402
from sphinx.application import Sphinx # noqa: E402

DEV_BUILD = os.getenv("BUILDDIR", None) == "latest"
BRANCH = "develop" if DEV_BUILD else "release"

project = "LSP Devtools"
copyright = "2023, Alex Carney"
author = "Alex Carney"
Expand Down Expand Up @@ -48,6 +51,19 @@
html_theme = "furo"
html_title = "LSP Devtools"
# html_static_path = ["_static"]
html_theme_options = {
"source_repository": "https://github.com/swyddfa/lsp-devtools/",
"source_branch": BRANCH,
"source_directory": "docs/",
}

if DEV_BUILD:
html_theme_options["announcement"] = (
"This is the unstable version of the documentation, features may change or "
"be removed without warning. "
'<a href="/lsp-devtools/docs/stable/en/">Click here</a> '
"to view the released version"
)


def lsp_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
Expand Down

0 comments on commit 963d1ca

Please sign in to comment.