Skip to content

feat(site): rebuild the package index site on the xpkgindex framework - #538

Merged
Sunrisepeak merged 5 commits into
mainfrom
site/framework-v2
Aug 7, 2026
Merged

feat(site): rebuild the package index site on the xpkgindex framework#538
Sunrisepeak merged 5 commits into
mainfrom
site/framework-v2

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Adopts the rebuilt xpkgindex framework (openxlings/xpkgindex#3) and adds the xim plugin that teaches it what a package means here. Companion PR: mcpplibs/mcpp-index#176.

Why a plugin, and why this one is the opposite of mcpp's

The old generator carried one ecosystem's assumptions in its core, and this index is where that showed:

  • A namespace here is a label, not identity. xlings resolves [index:]name[@version] against the index repository, so xlings install xim.gcc is not a thing. The plugin returns Identity.plain(...) explicitly. mcpp-index's plugin does the opposite, and the core now refuses to guess for either of them.
  • xvm, programs and archs are xlings concepts. They used to live in the core model, where they leaked onto mcpp's pages as a meaningless "XVM Managed: No". They are rendered here by this repo's plugin, and nowhere else.
  • Facets come from the fields this index actually populates — kind, category, status — rather than from a fixed list.

What lands

  • .xpkgindex/plugins/xim.py — identity, facets, the card row layout, and the Package / Credits / Keywords blocks.
  • .xpkgindex.json — the teal theme (light and dark), the card listing variant, the docs section, the homepage quick-start card, and zh / en / zh-Hant.
  • docs/quick-start.md + docs/quick-start.en.md — the landing document and the homepage card. Every command was checked against this repo and the xlings docs.
  • .xpkgindex/cache/github.json — committed, so the deploy build touches no network and a rendered page never depends on GitHub being reachable at deploy time.

The listing uses the card layout, where the whole question is "what do I type to get this": name and metadata on the header line, one copyable xlings install … in a tinted strip, and the binary you end up with beside it.

Three locales, including everything this repo writes

The default stays Chinese. Previously an English or Traditional visitor got a Chinese title, a Chinese quick-start card and Chinese doc names; now the title, lede, install label, card, doc navigation, the kind/category/status axes and the Package/Credits/Keywords headings all carry zh / en / zh-Hant.

Descriptor field names — programs, aliases, authors — stay as written, so a package page and its .lua still read as the same document.

links also splits what used to be one entry: website is xlings.d2learn.org (globe icon), docs now points at the documentation itself.

CI

  • pkgindex-deploy checked out shallow. xpkgindex skips the growth curve, history line and contributor list on a shallow clone rather than replaying a truncated log — so the live site has been missing all three. fetch-depth: 0 restores them, and GITHUB_TOKEN raises the rate limit and merges contributor identities.
  • The path filter ignored what shapes the site. .xpkgindex/** and docs/** are now included; a plugin or doc change used to deploy nothing.
  • site-check is new. Offline and --strict on pull requests, failing on any warning, asserting the pages a reader lands on exist in all three locales, and uploading the built site as an artifact for review.

Locally: 155 packages, 357 versions, 4 facet axes, 5 contributors, 0 warnings, --offline --strict green.

The generator used to model xvm / programs / archs in its core, which meant
every other ecosystem's pages carried them too. They are xlings concepts, so
they live in `.xpkgindex/plugins/xim.py` now.

- identity stays the short name: in xlings a descriptor's `namespace`
  (`config`, `xim`) is a classification label, and package references resolve
  as `[index:]name[@Version]` against the index repo — so joining it into the
  install command, as the mcpp side must, would produce commands the client
  rejects. Spelled out rather than left to the core default so a change there
  cannot silently rewrite 155 install commands
- a descriptor without a `namespace` is not un-namespaced: it resolves in the
  index's default namespace, so those 146 packages group under `xim` instead
  of a "—" bucket that does not exist
- facets from the fields this index actually populates: kind, category, status
- `card` listing layout, where the row leads with the copyable install command
- theme retoned (teal) so the two consumer sites are visually distinct
- stale links fixed: d2learn/* moved to openxlings/*
Same documents, one section name shared with the other consumer index. The
older `guides` config key still works, so this is a rename rather than a
migration.
Install xlings, install a package from this index, verify it runs — then
searching, listing and updating. Every command is taken from this repo's own
README rather than written from memory: notably each install is a single
package, which is the only form the repo documents.

Also: the About page's project link went to the website; the website stays
under the docs link and "project" now points at the repository, matching how
mcpp-index reads.
The index defaults to Chinese, so an English or Traditional visitor got a
Chinese title, a Chinese quick-start card and Chinese doc names. Site title
and lede, the install label, the card, the doc nav titles, the kind/category/
status axes and the Package/Credits/Keywords headings now carry zh / en /
zh-Hant.

Descriptor field names — programs, aliases, authors — stay as written, so a
package page and its .lua still read as the same document.

Also splits the two links that shared one entry: 'website' is xlings.d2learn.org
(globe icon), 'docs' now points at the documentation itself.
pkgindex-deploy checked out at the default depth of 1. xpkgindex detects a
shallow clone and skips the growth curve, the history line and the contributor
list rather than replaying a truncated log — so the deployed site has quietly
been missing all three. fetch-depth: 0 restores them, and GITHUB_TOKEN raises
the API rate limit and enables the author -> login mapping that merges one
person's several git identities.

The path filter gained .xpkgindex/** and docs/**: the plugin decides how every
package reads, the docs are rendered as site pages, and the cache is what an
offline build renders from. A change to any of them changes the site as much as
a descriptor does, and none of them triggered a deploy.

site-check is new. The other checks prove a descriptor installs; this proves it
still renders — offline, so a pull request spends no rate limit, and --strict,
so a replayed history that disagrees with the tree fails rather than warns. It
also fails on any warning at all, and asserts that the pages a reader actually
lands on exist in all three locales.
@Sunrisepeak
Sunrisepeak merged commit c381715 into main Aug 7, 2026
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.

2 participants