diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aae7a8f..94f08e6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,8 @@ mise run install [`sources.yml`](sources.yml) lists each source repository, where it's mounted, and which tags to publish; `dev` is a branch built as an extra, unreleased -version. The assembler ([`assembler/`](assembler/)) fetches only the docs +version. A version with `local: ` instead of a `ref` is built from that +directory in this repo; the SDK placeholders in [`stubs/`](stubs/) use it. The assembler ([`assembler/`](assembler/)) fetches only the docs directory at each ref, reads it in its own format (Fern `index.yml`, mdBook `SUMMARY.md`, or `docset.yml`), and writes the Starlight content, navigation, and Markdown copies. The commits it used are recorded in @@ -81,7 +82,7 @@ latest release of each docset only), and `scripts/website.mjs` indexes the website pages into `/pagefind-website/`. When built with `WEBSITE=1`, as Netlify and `mise run website` do, search merges the two, with the website pages at half weight so they don't outrank the docs. Each page records its section -(Core, Go SDK, Community) as Pagefind metadata, which the results show as a +(such as Core or Community) as Pagefind metadata, which the results show as a label. ## Markdown for agents diff --git a/README.md b/README.md index 76a7d3a..b5abc15 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,16 @@ branch, checks every link, and builds the docs with [Starlight](https://starlight.astro.build/). The newest release of each repository is published without a version in the URL, such as `/docs/about/overview/`; other versions have their own path, such as -`/docs/0.1.8/about/overview/` or `/docs/sdks/go/dev/`. +`/docs/0.1.8/about/overview/` or `/docs/dev/about/overview/`. The website serves the landing page and the community page at `/` and the docs at `/docs/`, all with one site bar and one search. Every page also has a Markdown copy for agents at its URL plus `.md`. The site is hosted on Netlify under the CNCF's account. +The Python, TypeScript, and Rust SDKs have placeholder pages from +[`stubs/`](stubs/) until their docs move out of the core docs. + To publish a new release, add its tag to `sources.yml`. ## Run it locally diff --git a/assembler/assemble.mjs b/assembler/assemble.mjs index 3d76fd2..d1d6d66 100644 --- a/assembler/assemble.mjs +++ b/assembler/assemble.mjs @@ -97,9 +97,12 @@ for (const [id, src] of Object.entries(manifest.sources)) { src, name: v.name ?? v.ref.replace(/^v/, ''), dev: false, - repo: v.repo ?? src.repo, - ref: v.ref, - subdir: v.path ?? src.path, + // A version can come from a directory in this repo (`local`) instead of + // a fetched ref, such as a placeholder for a docset with no docs yet. + repo: v.local ? manifest.site.repo : (v.repo ?? src.repo), + ref: v.local ? 'local' : v.ref, + subdir: v.local ? '' : (v.path ?? src.path), + local: v.local && path.join(root, v.local), }); const own = wanted.filter((w) => w.id === id); (own.find((w) => !w.dev) ?? own[0]).latest = true; diff --git a/site/src/components/overrides/Header.astro b/site/src/components/overrides/Header.astro index 3d5a9a7..46cfd4a 100644 --- a/site/src/components/overrides/Header.astro +++ b/site/src/components/overrides/Header.astro @@ -1,6 +1,7 @@ --- // SPDX-License-Identifier: Apache-2.0 -// Header: the site bar, then topic tabs, then (in topics with an overview page) +// Header: the site bar, then topic tabs (when there are several topics), then +// (in topics with an overview page) // sub-tabs for the overview and each docset. The site bar (wordmark, site // links, search, GitHub, theme) is theme/site-bar.mjs, shared with the website // pages, so it is the same markup, styles, and scripts everywhere. @@ -37,11 +38,13 @@ const subtabs = ds
- + {topics.length > 1 && ( + + )} {ds?.topic.landing && (