Skip to content

Commit

Permalink
Adopt the Xanadu Sphinx Theme (#73)
Browse files Browse the repository at this point in the history
* Adopt the centralized Xanadu Sphinx Theme

* Remove XIR residue

* Add Python 3.10 classifier to setup.py

* Update changelog

* Upgrade Black to address psf/black#2964

* Pin PyLint for GitHub Actions workflow

* Add link to arXiv paper to navbar

* Use new `.. index-card` directive for index.html cards

* Format `inheritance_node_attrs` to 80 columns

* Use XST version on PyPI
  • Loading branch information
Mandrenkov authored May 2, 2022
1 parent c74fd61 commit 99c55ce
Show file tree
Hide file tree
Showing 30 changed files with 80 additions and 3,601 deletions.
12 changes: 12 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
## Release 0.2.3 (development release)

### Documentation

* The centralized [Xanadu Sphinx Theme](https://github.com/XanaduAI/xanadu-sphinx-theme)
is now used to style the Sphinx documentation.
[(#73)](https://github.com/XanaduAI/jet/pull/73)

### Contributors

This release contains contributions from (in alphabetical order):

[Mikhail Andrenkov](https://github.com/Mandrenkov)

## Release 0.2.2 (current release)

### New features since last release
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ graft cmake
graft include
graft python/jet
graft python/src
graft python/xir
include python/CMakeLists.txt
include CMakeLists.txt
include LICENSE
File renamed without changes
239 changes: 0 additions & 239 deletions docs/_static/xanadu_gallery.css

This file was deleted.

76 changes: 32 additions & 44 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
nbsphinx_requirejs_path = ""

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates", "xanadu_theme"]
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
Expand All @@ -128,7 +128,7 @@

# General information about the project.
project = "Jet"
copyright = "2021, Xanadu Quantum Technologies Inc"
copyright = "2022, Xanadu Quantum Technologies"
author = "Xanadu Inc."

# The version info for the project you're documenting, acts as replacement for
Expand All @@ -139,7 +139,7 @@
from jet import __version__ as release

# The short X.Y version.
version = re.match(r"^(\d+\.\d+)", release).expand(r"\1")
version = re.match(r"\d+\.\d+", release).group(0)

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -236,24 +236,10 @@

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
# html_sidebars = {
# '**': [
# 'about.html',
# 'navigation.html',
# 'relations.html', # needs 'show_related': True theme option to display
# 'searchbox.html',
# 'donate.html',
# ]
# }
html_sidebars = {
"**": [
"logo-text.html",
"searchbox.html",
"globaltoc.html",
# 'sourcelink.html'
]
}

Expand Down Expand Up @@ -302,38 +288,40 @@
# html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = "jetsdoc"
htmlhelp_basename = "Jetdoc"

# # -- Xanadu theme ---------------------------------------------------------
html_theme = "xanadu_theme"
html_theme_path = ["."]
inheritance_node_attrs = dict(
color="lightskyblue1", fillcolor="lightskyblue1", style="filled"
)

# Register the theme as an extension to generate a sitemap.xml
# extensions.append("guzzle_sphinx_theme")
# -- Xanadu theme ---------------------------------------------------------
html_theme = "xanadu"

# xanadu theme options (see theme.conf for more information)
# Xanadu theme options (see theme.conf for more information).
html_theme_options = {
# Set the path to a special layout to include for the homepage
# "homepage": "special_index.html",
# Set the name of the project to appear in the left sidebar.
"project_nav_name": "Jet",
# TODO: Set Google Analytics ID to enable tracking.
# "google_analytics_account": "UA-116279123-2",
# colors
"navigation_button": "#5e35b1",
"navigation_button_hover": "#320b86",
"toc_caption": "#7e57c2",
"toc_hover": "#7e57c2",
"table_header_bg": "#ffdce5",
"table_header_border": "#7e57c2",
"download_button": "#7e57c2",
"navbar_name": "Jet",
"navbar_logo_colour": "#7e57c2",

"navbar_right_links": [
{
"name": "Paper",
"href": "https://arxiv.org/abs/2107.09793",
"icon": "fas fa-book",
},
{
"name": "GitHub",
"href": "https://github.com/XanaduAI/jet",
"icon": "fab fa-github",
}
],

"prev_next_button_colour": "#5e35b1",
"prev_next_button_hover_colour": "#320b86",
"toc_marker_colour": "#7e57c2",
"table_header_background_colour": "#ffdce5",
"border_colour": "#7e57c2",
"text_accent_colour": "#7e57c2",
}

edit_on_github_project = "XanaduAI/jet"
edit_on_github_branch = "main/docs"

inheritance_node_attrs = dict(color="lightskyblue1", fillcolor="lightskyblue1", style="filled")


def setup(app):
app.add_css_file("xanadu_gallery.css")
Loading

0 comments on commit 99c55ce

Please sign in to comment.