Skip to content

Commit ab04ed7

Browse files
Adopt the centralized Xanadu Sphinx Theme (#287)
* Adopt the centralized Xanadu Sphinx Theme * Update changelog * Update changelog and version number * Use XST version on PyPI * Add @trevor-vincent to v0.23.0 contributors Co-authored-by: antalszava <[email protected]> * Remove Documentation heading from v0.23.0 changelog Co-authored-by: antalszava <[email protected]> * Bump version number to `0.24.0-dev4` Co-authored-by: antalszava <[email protected]>
1 parent 6537614 commit ab04ed7

30 files changed

+102
-3273
lines changed

.github/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@
88

99
### Documentation
1010

11+
* Use the centralized [Xanadu Sphinx Theme](https://github.com/XanaduAI/xanadu-sphinx-theme)
12+
to style the Sphinx documentation.
13+
[(#287)](https://github.com/PennyLaneAI/pennylane-lightning/pull/287)
14+
1115
### Bug fixes
1216

1317
### Contributors
1418

1519
This release contains contributions from (in alphabetical order):
1620

21+
Mikhail Andrenkov
22+
1723
---
1824

1925
# Release 0.23.0
@@ -63,6 +69,7 @@ This release contains contributions from (in alphabetical order):
6369
### Contributors
6470

6571
This release contains contributions from (in alphabetical order):
72+
6673
Ali Asadi, Chae-Yeun Park, Lee James O'Riordan, and Trevor Vincent
6774

6875
---

doc/_static/pennylane.png

-1.99 KB
Binary file not shown.

doc/_static/pl_wordmark.png

1.38 KB
Loading

doc/_static/xanadu_logo.png

-27.9 KB
Binary file not shown.

doc/_static/xanadu_logo_small.png

-51.8 KB
Binary file not shown.

doc/_static/xanadu_x.png

-19.1 KB
Binary file not shown.

doc/conf.py

+67-30
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,18 @@ def __getattr__(cls, name):
129129
}
130130

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

134134
# The suffix(es) of source filenames.
135135
# You can specify multiple suffix as a list of string:
136-
#
137-
# source_suffix = ['.rst', '.md']
138136
source_suffix = ".rst"
139137

140138
# The master toctree document.
141139
master_doc = "index"
142140

143141
# General information about the project.
144142
project = "PennyLane-Lightning"
145-
copyright = "Copyright 2021"
143+
copyright = "2022, Xanadu Quantum Technologies"
146144
author = "Xanadu Inc."
147145

148146
add_module_names = False
@@ -199,36 +197,81 @@ def __getattr__(cls, name):
199197

200198
# Custom sidebar templates, must be a dictionary that maps document names
201199
# to template names.
202-
#
203-
# This is required for the alabaster theme
204-
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
205200
html_sidebars = {
206201
"**": [
207-
"logo-text.html",
208202
"searchbox.html",
209203
"globaltoc.html",
210204
]
211205
}
212206

213-
214207
# -- Xanadu theme ---------------------------------------------------------
215-
html_theme = "xanadu_theme"
216-
html_theme_path = ["."]
208+
html_theme = "xanadu"
217209

218210
# xanadu theme options (see theme.conf for more information)
219211
html_theme_options = {
220-
# Set the name of the project to appear in the left sidebar.
221-
"project_nav_name": "PennyLane-Lightning",
222-
# Path to a touch icon
223-
"touch_icon": "logo_new.png",
224-
"large_toc": True,
225-
"navigation_button": "#19b37b",
226-
"navigation_button_hover": "#0e714d",
227-
"toc_caption": "#19b37b",
228-
"toc_hover": "#19b37b",
229-
"table_header_bg": "#edf7f4",
230-
"table_header_border": "#19b37b",
231-
"download_button": "#19b37b",
212+
"navbar_wordmark_path": "_static/pl_wordmark.png",
213+
# Specifying #19b37b is more correct but does not match the other PL websites.
214+
"navbar_logo_colour": "#2d7c7f",
215+
216+
"navbar_home_link": "https://pennylane.ai",
217+
218+
"navbar_left_links": [
219+
{
220+
"name": "Quantum machine learning",
221+
"href": "https://pennylane.ai/qml/",
222+
},
223+
{
224+
"name": "Demos",
225+
"href": "https://pennylane.ai/qml/demonstrations.html",
226+
},
227+
{
228+
"name": "Install",
229+
"href": "https://pennylane.ai/install.html",
230+
},
231+
{
232+
"name": "Plugins",
233+
"href": "https://pennylane.ai/plugins.html",
234+
"active": True,
235+
},
236+
{
237+
"name": "Documentation",
238+
"href": "https://pennylane.readthedocs.io/",
239+
},
240+
{
241+
"name": "Blog",
242+
"href": "https://pennylane.ai/blog/",
243+
}
244+
],
245+
246+
"navbar_right_links": [
247+
{
248+
"name": "FAQ",
249+
"href": "https://pennylane.ai/faq.html",
250+
"icon": "fas fa-question",
251+
},
252+
{
253+
"name": "Support",
254+
"href": "https://discuss.pennylane.ai/",
255+
"icon": "fab fa-discourse",
256+
},
257+
{
258+
"name": "GitHub",
259+
"href": "https://github.com/PennyLaneAI/pennylane-lightning",
260+
"icon": "fab fa-github",
261+
}
262+
],
263+
264+
"extra_copyrights": [
265+
"TensorFlow, the TensorFlow logo, and any related marks are trademarks "
266+
"of Google Inc."
267+
],
268+
269+
"border_colour": "#19b37b",
270+
"prev_next_button_colour": "#19b37b",
271+
"prev_next_button_hover_colour": "#0e714d",
272+
"table_header_background_colour": "#edf7f4",
273+
"text_accent_colour": "#19b37b",
274+
"toc_marker_colour": "#19b37b",
232275
}
233276

234277
edit_on_github_project = "PennyLaneAI/pennylane-lightning"
@@ -240,13 +283,7 @@ def __getattr__(cls, name):
240283
autodoc_member_order = "bysource"
241284

242285
# inheritance_diagram graphviz attributes
243-
inheritance_node_attrs = dict(color="lightskyblue1", style="filled")
286+
inheritance_node_attrs = dict(color="lightskyblue1", fillcolor="lightskyblue1", style="filled")
244287

245288
# autodoc_default_flags = ['members']
246289
autosummary_generate = True
247-
248-
from directives import CustomDeviceGalleryItemDirective
249-
250-
251-
def setup(app):
252-
app.add_directive("devicegalleryitem", CustomDeviceGalleryItemDirective)

doc/directives.py

-88
This file was deleted.

doc/index.rst

+3-23
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,12 @@
1-
PennyLane-Lightning Plugin
2-
##########################
3-
4-
:Release: |release|
5-
6-
.. include:: ../README.rst
7-
:start-after: header-start-inclusion-marker-do-not-remove
8-
:end-before: header-end-inclusion-marker-do-not-remove
9-
10-
Devices
11-
=======
12-
13-
PennyLane-Lightning provides the following device:
14-
15-
.. devicegalleryitem::
16-
:name: 'lightning.qubit'
17-
:description: A fast state-vector qubit simulator written in C++
18-
:link: devices.html
19-
20-
.. raw:: html
21-
22-
<div style='clear:both'></div>
23-
</br>
1+
.. include:: overview.rst
242

253
.. toctree::
264
:maxdepth: 2
5+
:caption: PennyLane-Lightning
276
:titlesonly:
287
:hidden:
298

9+
Overview <overview>
3010
installation
3111
support
3212
Architecture <arch/arch_overview>

doc/overview.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
PennyLane-Lightning Plugin
2+
##########################
3+
4+
:Release: |release|
5+
6+
.. include:: ../README.rst
7+
:start-after: header-start-inclusion-marker-do-not-remove
8+
:end-before: header-end-inclusion-marker-do-not-remove
9+
10+
Devices
11+
=======
12+
13+
PennyLane-Lightning provides the following device:
14+
15+
.. title-card::
16+
:name: 'lightning.qubit'
17+
:description: A fast state-vector qubit simulator written in C++
18+
:link: devices.html
19+
20+
.. raw:: html
21+
22+
<div style='clear:both'></div>
23+
</br>

doc/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ graphviz
55
pybind11
66
sphinx
77
sphinx-automodapi
8+
xanadu-sphinx-theme==0.1.0

doc/xanadu_theme/LICENSE

-20
This file was deleted.

doc/xanadu_theme/comments.html

-16
This file was deleted.

0 commit comments

Comments
 (0)