3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-05 09:04:08 +00:00

Docs: Don't READTHEDOCS on local builds

This commit is contained in:
Krystine Sherwin 2025-03-18 03:57:17 +13:00
parent 8877817fa9
commit 39a1623ac0
No known key found for this signature in database

View file

@ -16,15 +16,17 @@ html_theme_options: dict[str] = {
"source_branch": "main",
"source_directory": "docs/source/",
}
html_context: dict[str] = {}
# try to fix the readthedocs detection
html_context: dict[str] = {
"READTHEDOCS": True,
"display_github": True,
"github_user": "YosysHQ",
"github_repo": "yosys",
"slug": "yosys",
}
if os.getenv("READTHEDOCS"):
html_context.update({
"READTHEDOCS": True,
"display_github": True,
"github_user": "YosysHQ",
"github_repo": "yosys",
"slug": "yosys",
})
# override source_branch if not main
git_slug = os.getenv("READTHEDOCS_VERSION_NAME")