Skip to content

Commit da90c0d

Browse files
committed
Merge branch 'dev' into master: index and search links
2 parents 0f29791 + b89f34c commit da90c0d

3 files changed

Lines changed: 54 additions & 0 deletions

File tree

‎docs/acceptance/2026-10-26-iteration-10-comments-bilingual-docs.md‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,42 @@ starts with a number is parsed by MyST in a way that leaves it untranslated, and
497497
`check_built_site.py` now refuses to run when one language build is missing
498498
instead of reporting a single-language result as green.
499499

500+
### Site quality round (2026-10-26, after the owner's "industry best" request)
501+
502+
The site was brought to the shape a mature documentation product is expected to
503+
have, all bilingual and gated in CI:
504+
505+
- **Structure.** Tutorial, cookbook, task guides, reference, and the explanation
506+
pages (conventions, architecture) plus a glossary now cover the four Diátaxis
507+
quadrants; examples and release notes were added as their own pages.
508+
- **Reading experience.** Top-right EN / 中文 pill (same page, host-aware),
509+
light/dark switch with no flash before first paint and a remembered choice,
510+
copy button on every code block, Ctrl+K to focus search, skip link, focus
511+
outlines, print stylesheet, "Edit on GitHub" and a version badge.
512+
- **Discoverability.** Per-language description and Open Graph tags, hreflang
513+
alternates, self-canonical links, `sitemap.xml` derived from the deployed
514+
artefact, `robots.txt`, a bilingual 404 page and an SVG favicon.
515+
- **Validity and accessibility.** A Sphinx extension de-duplicates element ids —
516+
Breathe repeated twelve of them across module pages — leaving one `h1` per page,
517+
all inputs with accessible names and no images without `alt`. Measured at a
518+
530 px viewport in both themes: no horizontal overflow, body contrast 10.11:1
519+
(light) and 13.15:1 (dark), code contrast 9.76:1 / 10.56:1.
520+
- **Gates.** The docs workflow runs the language-switch test and
521+
`check_built_site.py` after building both languages, so a broken link, a machine
522+
path or an untranslated/fuzzy entry fails CI. Final counts: `pages=72
523+
broken_links=0 machine_path_pages=0 catalogs=34 entries=3995 translated=3992
524+
untranslated=3 fuzzy=0`; the three remaining entries are the reviewed
525+
`Subclassed by` exemption.
526+
527+
Two defaults were corrected along the way and are worth remembering: the site
528+
checker used to point at a `zh-cn` build directory while local builds write
529+
`zh_CN` (it now auto-detects and refuses to check one language), and the first
530+
canonical link used `html_baseurl` from the template context, which can be absent
531+
and silently produced relative hrefs — the checker caught it on twenty pages.
532+
533+
What remains is not a structural gap: the owner creates the single Read the Docs
534+
project, and content keeps being maintained as the library evolves.
535+
500536
## 5. P133 — publication: PLATFORM_PENDING
501537

502538
Configuration is in the repository and is buildable, but no live site was

‎docs/site/_static/custom.css‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,3 +481,16 @@ button:focus-visible,
481481
background: #2f6f9f !important;
482482
border-color: #2f6f9f !important;
483483
}
484+
.fc-doc-links {
485+
margin: 0.4rem 0 1rem;
486+
padding: 0 0.75rem;
487+
font-size: 0.9em;
488+
color: #9fb0be;
489+
}
490+
.fc-doc-links a {
491+
color: #cfe3ff;
492+
text-decoration: none;
493+
}
494+
.fc-doc-links a:hover {
495+
text-decoration: underline;
496+
}

‎docs/site/_templates/layout.html‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
<a href="{{ fc_docs_zh_url }}" data-fc-language="zh-cn"
5959
{% if language != 'en' %}class="fc-active"{% endif %}>简体中文</a>
6060
</div>
61+
<div class="fc-doc-links">
62+
<a href="{{ pathto('genindex') }}">{% if language == 'en' %}Index{% else %}索引{% endif %}</a>
63+
<span aria-hidden="true">·</span>
64+
<a href="{{ pathto('search') }}">{% if language == 'en' %}Search{% else %}搜索{% endif %}</a>
65+
</div>
6166
{% endblock %}
6267

6368
{% block content %}

0 commit comments

Comments
 (0)