Commit 4739a0f
## Add sitemap generation for documentation
### Summary
- Added `sphinx-sitemap` extension to automatically generate a sitemap
for the PennyLane lightning documentation, improving SEO and to reduce
number of [404
pages](https://www.notion.so/xanaduai/404-URLs-on-PennyLane-Website-2a7bc6bd1764807ba9a4c145e9d15ee8?pvs=26&qid=1%3A95a102a1-752c-4dff-8481-3a834455b689%3A3)
showing up in Google Console.
- marks C++ API pages a `no-index` to prevent C++ pages from getting
indexed in Google.
### Changes
- Added `sphinx_sitemap` to Sphinx extensions in `doc/conf.py`
- Updated `html_baseurl` to use proper canonical URL with ReadTheDocs
fallback
- Added `sitemap_url_scheme` configuration for standard sitemap format
- Added `sphinx-sitemap` dependency to:
- `doc/requirements.txt`
- `pyproject.toml` (docs optional dependencies)
- Added `add_noindex_to_cpp_pages` to exclude C++ API pages
- Rest are just formatting changes by `black`
## Ticket
-
[sc-103646-add-sitemap-for-docs-pennylane-ai-lightning](https://app.shortcut.com/xanaduai/story/103646/add-sitemap-for-docs-pennylane-ai-lightning)
-
[sc-103649-add-no-index-to-c-library-pages-in-lightning](https://app.shortcut.com/xanaduai/story/103649/add-no-index-to-c-library-pages-in-lightning-docs?vc_group_by=day&ct_workflow=all&cf_workflow=500000005)
## Testing
- Check the sitemap
[here](https://xanaduai-pennylane--1331.com.readthedocs.build/projects/lightning/en/1331/sitemap.xml)
which includes list of all pages excluding C++ API ones.
- Screenshot below to confirm addition of `no-index` tag to tell google
to not index C++ API pages
<img width="1865" height="571" alt="Screenshot 2026-01-16 at 10 15
54 AM"
src="https://github.com/user-attachments/assets/1bafd238-25ae-49f7-ac3b-0bb2880389ff"
/>
---------
Co-authored-by: ringo-but-quantum <[email protected]>
1 parent b82f0b1 commit 4739a0f
File tree
5 files changed
+66
-13
lines changed- .github
- doc
- pennylane_lightning/core
5 files changed
+66
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
50 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
51 | 61 | | |
52 | 62 | | |
53 | 63 | | |
| |||
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
66 | | - | |
67 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
68 | 80 | | |
69 | 81 | | |
70 | 82 | | |
| |||
94 | 106 | | |
95 | 107 | | |
96 | 108 | | |
| 109 | + | |
97 | 110 | | |
98 | 111 | | |
99 | 112 | | |
| |||
106 | 119 | | |
107 | 120 | | |
108 | 121 | | |
109 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
110 | 125 | | |
111 | | - | |
| 126 | + | |
112 | 127 | | |
113 | 128 | | |
114 | 129 | | |
| |||
119 | 134 | | |
120 | 135 | | |
121 | 136 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 137 | + | |
125 | 138 | | |
126 | 139 | | |
127 | 140 | | |
| |||
136 | 149 | | |
137 | 150 | | |
138 | 151 | | |
139 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
140 | 155 | | |
141 | 156 | | |
142 | 157 | | |
| |||
237 | 252 | | |
238 | 253 | | |
239 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
240 | 282 | | |
241 | 283 | | |
242 | 284 | | |
243 | 285 | | |
244 | 286 | | |
245 | 287 | | |
246 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
247 | 291 | | |
248 | 292 | | |
249 | 293 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
0 commit comments