Skip to content

docs: describe API pages in their titles and link the Library - #66

Merged
sarseniy merged 1 commit into
mainfrom
arsenii/stt-343-docs-api-titles-library-links
Nov 16, 2026
Merged

sarseniy merged 1 commit into
mainfrom
arsenii/stt-343-docs-api-titles-library-links

Conversation

@sarseniy

@sarseniy sarseniy commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An API reference page had its module's bare name as the <title> and the site-wide description as its meta description, so a search result for it said nothing about the page. Each generated page now takes both from its module's docstring. The "Algorithms Explained" pages also point to the EigenOrbit Library page on the same method.

Page Title before Title after
api/core/backends/qiskit_aer_backend/ qiskit_aer_backend - eigenkit qiskit_aer_backend: The Qiskit Aer backend | eigenkit API
api/chemistry/ansatz/ ansatz - eigenkit ansatz: Ansatz building blocks for chemistry circuits | eigenkit API
api/qml/qsvr/ qsvr - eigenkit qsvr: Quantum support vector regressor (QSVR) | eigenkit API
api/torch/estimators/hqnc/ hqnc - eigenkit hqnc: Hybrid quantum neural network classifier (HQNC) | eigenkit API

The description of each of these was "eigenkit is an open-source Python library for quantum computing and quantum machine learning. Write an algorithm once, run it on any simulator or QPU." It is now the opening of the module's docstring, for example "The Qiskit Aer backend, with the statevector and matrix product state (MPS) methods."

How

  • docs/gen_ref_pages.py writes html_title and description as front matter of every generated page. A module with no docstring of its own (hhl, iqae, qsvc, qsvr, hqnc, hqnr and five more) is described by the class it is named after.
  • overrides/main.html reads html_title for <title>, og:title and twitter:title. Front matter title is not used: it would also replace the short module name in the header and in the site search.
  • Each page of docs/algorithms/ that has a matching Library page gets one sentence in its "Next" section: 11 links on 7 pages, and one sentence on the section's index. The ansatz page that vqe.md links is being published now; the other ten links are live.

What stays as it was

  • The heading, the navigation label and the header text of all 94 API pages.
  • llms.txt and the markdown copy of every API page: html_title appears in no built file.
  • The titles and descriptions of the pages that are not generated.

Known rough edges

  • api/core/variational/ keeps a fallback title, eigenkit.core.variational API reference | eigenkit: its summary line holds a formula.
  • 16 titles run past 70 characters, the longest 94. A title is cut at a clause, never inside one, and search engines shorten a long title themselves.
  • api/core/ir/ and api/photonics/ir/ get the same title, ir: The intermediate representation | eigenkit API.

A better summary line in the module's docstring fixes any of these.

Test plan

  • uv run pytest passes (in CI, on every platform; not run locally, since no test covers docs/)
  • uv run pre-commit run --all-files is clean
  • uv run mkdocs build --strict passes (if docs changed)
  • The six checkers of tools/docs-checks/ exit 0
  • The built site compared with a build of main: on the API pages only the title, description, Open Graph and Twitter tags differ; no title or description is empty

Related issues

None.

An API reference page had its module's bare name as its <title> and the
site's description as its meta description, so a search result for it
read "qiskit_aer_backend - eigenkit" over a sentence about the whole
library. docs/gen_ref_pages.py now writes both from the module's
docstring as front matter, and overrides/main.html reads the title from
`html_title`, so the page's heading, its label in the navigation and the
site search keep the short module name. A module with no docstring of
its own (hhl, iqae, qsvc, hqnc and others) is described by the class it
is named after.

The "Algorithms Explained" pages each point to the EigenOrbit Library
page on the same method, which says when the method is worth using and
shows it against a classical baseline.
@github-actions

Copy link
Copy Markdown

Docs preview: https://pr-66.eigenkit-docs.pages.dev

@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@sarseniy
sarseniy merged commit 8f43aff into main Nov 16, 2026
18 checks passed
@sarseniy
sarseniy deleted the arsenii/stt-343-docs-api-titles-library-links branch November 16, 2026 16:31

This branch was successfully deployed

1 active deployment
docs-preview — 42e9ad98 Deployed Nov 16, 2026 by sarseniy via preview #89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant