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

docs: Use new Quantinuum docs theme #519

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "docs/quantinuum-sphinx"]
path = docs/quantinuum-sphinx
url = https://github.com/CQCL/quantinuum-sphinx.git
branch = dist
38 changes: 0 additions & 38 deletions docs/_static/custom.css

This file was deleted.

13 changes: 13 additions & 0 deletions docs/_static/nav-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const navConfig = {
"navTextLinks": [

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No "title" or "href" ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what we should have in the navbar. Any ideas what to put here?

],
"navProductName": 'Guppy',
"navIconLinks": [
{
"title": 'Github',
"href": "https://github.com/CQCL/guppylang/",
"iconImageURL": "/_static/assets/github.svg",
},
],
}
20 changes: 5 additions & 15 deletions docs/api-docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,16 @@
"sphinx.ext.intersphinx",
]

html_theme = "sphinx_book_theme"

html_theme = "furo"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I think you are supposed to add html_favicon??

html_title = "Guppy compiler development docs"
html_theme_options = {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary or just good for explicitness? (Happy either way, but if the latter, might be good to add a comment at line end)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, I copied this from CQCL/hugr#1267


html_theme_options = {
"repository_url": "https://github.com/CQCL/guppylang",
"use_repository_button": True,
"navigation_with_keys": True,
"logo": {
"image_light": "_static/Quantinuum_logo_black.png",
"image_dark": "_static/Quantinuum_logo_white.png",
},
}

html_static_path = ["../_static"]
html_css_files = ["custom.css"]
html_static_path = ["../_static", "../quantinuum-sphinx/_static"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super-nit: according to https://github.com/CQCL/quantinuum-sphinx, these should be ordered the other way around

templates_path = ["_templates", "../quantinuum-sphinx/_templates"]
html_favicon = "../quantinuum-sphinx/_static/assets/quantinuum_favicon.svg"

autosummary_generate = True

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

intersphinx_mapping = {
Expand Down
1 change: 1 addition & 0 deletions docs/quantinuum-sphinx
Submodule quantinuum-sphinx added at a8ac27
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = [

[project.optional-dependencies]
# pytket = ["pytket >=1.30.0,<2", "tket2 >=0.4.1,<0.5"]
docs = ["sphinx >=7.2.6,<9", "sphinx-book-theme >=1.1.2,<2"]
docs = ["sphinx >=7.2.6,<9", "furo >=2024.5.6"]
execution = ["execute-llvm"]
pytket = ["pytket>=1.34"]

Expand Down
59 changes: 21 additions & 38 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading