Skip to content

Commit bf16b64

Browse files
authored
feat(site): publish only the core docs for now (#19)
* feat(site): name the docset in the version picker label The picker label reads "OpenShell version" or "Go SDK version" instead of "Version", so it's clear which docset the picker switches. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * fix(site): link the GitHub icon to the ai-openshell organization The docs header linked to the docs repository. The GitHub organization covers the core repository, the SDKs, and the docs. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): add a community page written in Markdown Pages outside the docs can now be Markdown files in www/. scripts/website.mjs renders each www/<name>.md into the landing page's header and footer at /<name>/ and publishes its Markdown copy at /<name>.md. The landing page stays hand-written HTML. The first page, /community/, links the CNCF Slack channel and the GitHub organization. The landing header links to it, and its GitHub icon now points to the organization. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * docs: describe website pages, Markdown for agents, and hosting Covers adding Markdown pages, the .md copies and llms.txt the site publishes for agents, and hosting on Netlify under the CNCF account. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): share one header between the landing page and the docs The docs header now has the same site bar as the landing page: the wordmark and the Docs and Community links on the left, then search (docs only), GitHub, and a light/dark toggle. Both read their links and the GitHub URL from theme/nav.json, so a new page needs one entry. The docs toggle replaces Starlight's theme select in the header and keeps the mobile menu's select in sync. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * docs: drop release numbers from the README The docset table listed each published release and went stale with every release. It now names each docset's dev branch; sources.yml is the list of releases. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): link the docs wordmark home and set the site links apart The OpenShell wordmark in the docs header now goes to the landing page at / instead of the docs home. The Docs and Community links use the body text color at a slightly larger size, sit after a divider further from the wordmark, and turn the accent color on hover and for the current section. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * fix(site): link the #openshell-dev Slack channel The community page now links the channel directly and keeps slack.cncf.io for people without a CNCF Slack account. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): share an auto/light/dark theme toggle between the landing page and the docs theme/theme-toggle.html and theme-toggle.js hold one toggle that both headers use. Each click cycles auto, light, dark; auto follows the system setting. The choice is stored where Starlight keeps it, so it carries between the landing page and the docs and the docs mobile menu's theme select stays in sync. Both headers now show the same icons, including one for auto. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): separate the site bar from the docs tabs with a line Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): search the docs and the website pages from every page scripts/website.mjs indexes the Markdown pages with Pagefind into /pagefind-www/. The docs search merges that index when built with WEBSITE=1 (set on Netlify and by mise run website), and the landing and community pages get a search button and dialog (www/search.js) that use the docs index plus the same merged index, with Starlight's ranking. Website pages count half so a short page doesn't outrank the docs on a common term. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): organize the community page like OpenTelemetry's, with icons The Chat section becomes a Develop and contribute section: the contributing guide, then GitHub and the #openshell-dev Slack channel, with a pointer to the #openshell-* subproject channels and slack.cncf.io. Markdown pages can now use :name: shortcodes for icons in www/icons/; the GitHub and Slack logos come from Starlight's icon set and are excluded from the SPDX check as third-party artwork. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * fix(site): keep the header from shifting between the landing page and the docs The docs header's site bar shrank by a fraction of a pixel to fit Starlight's header border, so the wordmark sat slightly higher than on the landing page. It now keeps its full height. The landing header also uses the docs' side padding, link spacing, and search breakpoints, so the wordmark, links, and search stay in place at every width. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): drop the arrow from the landing page's Documentation button Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): share one site bar and search between the docs and the website theme/site-bar.mjs renders the site bar (wordmark, site links, search, GitHub, theme toggle) and the search dialog for every page, with one stylesheet (theme/site-bar.css) and one search script (theme/search.js). The docs header and scripts/website.mjs both use it, so the bar can no longer drift between the docs and the landing and community pages. The docs now use this search instead of Starlight's search box; Starlight still builds the Pagefind index. Search changes: - Whole result rows are clickable, with one row per page and per section, all the same width. - Each result shows where it comes from (Core, Go SDK, SDKs, Community), from Pagefind metadata set on every page. - Page icons, tighter spacing, arrow-key navigation, a link-style Clear, and an X that closes the dialog (Esc too). - The dialog uses the site's type scale: a regular-weight query, semibold titles, and 14px excerpts. The community page title now matches docs page titles. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * docs: keep the README to an overview and move build details to CONTRIBUTING The README now covers what the repository builds, how it works in brief, publishing a release, and running the website locally. CONTRIBUTING.md gains the build, website pages, site bar and search, Markdown for agents, and hosting details. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): publish only the core docs for now The Go SDK is the only SDK that publishes its own docs, so an SDKs section that lists only Go is confusing. The site now builds only the core docs: sources.yml drops the SDKs topic and the sdk-go source, and topics/sdks.mdx goes. The header shows the topic tabs only when there are several topics, so with one topic the docs have just the site bar. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): open links to other sites in a new tab on the website pages On the Markdown pages, such as /community/, links to other sites (GitHub, Slack, the CNCF) get target="_blank" rel="noopener". Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * refactor(site): rename www/ to website/ website/ says what the folder holds: the website's own pages outside the docs (the landing page, the community page, their styles and icons). It matches scripts/website.mjs and the website tasks. The website pages' search index moves from /pagefind-www/ to /pagefind-website/ to match, and README and CONTRIBUTING say what website/ holds next to site/. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * feat(site): underline the current site link Hover and the current section looked the same. Hover now only changes the link color; the current section (Docs or Community) also gets an accent underline. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> --------- Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
1 parent 58ea8a3 commit bf16b64

6 files changed

Lines changed: 17 additions & 34 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ latest release of each docset only), and `scripts/website.mjs` indexes the
8181
website pages into `/pagefind-website/`. When built with `WEBSITE=1`, as Netlify
8282
and `mise run website` do, search merges the two, with the website pages at
8383
half weight so they don't outrank the docs. Each page records its section
84-
(Core, Go SDK, Community) as Pagefind metadata, which the results show as a
84+
(such as Core or Community) as Pagefind metadata, which the results show as a
8585
label.
8686

8787
## Markdown for agents

‎README.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ the docs, such as the landing page, in [`website/`](website/).
1111
| Docset | Repository | Path | Dev branch |
1212
| --------- | ------------------------------------------------------------------- | ----------- | ---------- |
1313
| OpenShell | [ai-openshell/openshell](https://github.com/ai-openshell/openshell) | `docs/` | `main` |
14-
| Go SDK | [ai-openshell/sdk-go](https://github.com/ai-openshell/sdk-go) | `docs/src/` | `main` |
1514

1615
## How it works
1716

@@ -21,7 +20,7 @@ branch, checks every link, and builds the docs with
2120
[Starlight](https://starlight.astro.build/). The newest release of each
2221
repository is published without a version in the URL, such as
2322
`/docs/about/overview/`; other versions have their own path, such as
24-
`/docs/0.1.8/about/overview/` or `/docs/sdks/go/dev/`.
23+
`/docs/0.1.8/about/overview/` or `/docs/dev/about/overview/`.
2524

2625
The website serves the landing page and the community page at `/` and the docs
2726
at `/docs/`, all with one site bar and one search. Every page also has a

‎site/src/components/overrides/Header.astro‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
// SPDX-License-Identifier: Apache-2.0
3-
// Header: the site bar, then topic tabs, then (in topics with an overview page)
3+
// Header: the site bar, then topic tabs (when there are several topics), then
4+
// (in topics with an overview page)
45
// sub-tabs for the overview and each docset. The site bar (wordmark, site
56
// links, search, GitHub, theme) is theme/site-bar.mjs, shared with the website
67
// pages, so it is the same markup, styles, and scripts everywhere.
@@ -37,11 +38,13 @@ const subtabs = ds
3738

3839
<div class="os-header">
3940
<Fragment set:html={bar} />
40-
<nav class="os-tabs print:hidden" aria-label="Topics">
41-
{topics.map((t) => (
42-
<a href={t.href} class="os-tab" aria-current={t.isCurrent ? 'true' : undefined}>{t.label}</a>
43-
))}
44-
</nav>
41+
{topics.length > 1 && (
42+
<nav class="os-tabs print:hidden" aria-label="Topics">
43+
{topics.map((t) => (
44+
<a href={t.href} class="os-tab" aria-current={t.isCurrent ? 'true' : undefined}>{t.label}</a>
45+
))}
46+
</nav>
47+
)}
4548
{ds?.topic.landing && (
4649
<div class="os-subtabs print:hidden">
4750
<nav class="os-subtabs__links" aria-label={ds.topic.label}>

‎site/src/styles/theme.css‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
/* layout */
3535
--os-tabs-h: 2.75rem;
36-
--sl-nav-height: calc(var(--os-header-h) + var(--os-tabs-h));
36+
--sl-nav-height: var(--os-header-h);
3737
--sl-nav-pad-x: 1.25rem;
3838
--sl-sidebar-width: 17rem;
3939
--sl-content-width: var(--os-content-w);
@@ -207,6 +207,10 @@ body {
207207
color: var(--os-muted);
208208
}
209209

210+
/* Topic tabs show only when there are several topics (Header.astro) */
211+
html:has(.os-tabs) {
212+
--sl-nav-height: calc(var(--os-header-h) + var(--os-tabs-h));
213+
}
210214
.os-tabs {
211215
display: flex;
212216
gap: 1.5rem;

‎sources.yml‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# The format of each checkout is detected: docs/docset.yml (native),
1919
# docs/index.yml (Fern) or SUMMARY.md (mdBook). Old tags build as they are.
2020
#
21-
# Topics are the header tabs. A topic with a `description` or several sources
21+
# Topics are the header tabs, shown when there are several. A topic with a `description` or several sources
2222
# gets an overview page at /<id>/ (with an optional `intro` from this repo) and
2323
# sub-tabs for the overview and each source. Otherwise its tab opens its only
2424
# source.
@@ -31,11 +31,6 @@ topics:
3131
- id: core
3232
label: Core
3333
sources: [core]
34-
- id: sdks
35-
label: SDKs
36-
description: Client libraries for the OpenShell gateway API.
37-
intro: topics/sdks.mdx
38-
sources: [sdk-go]
3934

4035
sources:
4136
core:
@@ -49,15 +44,3 @@ sources:
4944
- { name: "0.1.9", ref: v0.1.9 }
5045
- { name: "0.1.8", ref: v0.1.8 }
5146
- { name: "0.1.7", ref: v0.1.7 }
52-
53-
sdk-go:
54-
title: Go SDK
55-
description: Go client for services and command-line tools.
56-
mount: sdks/go
57-
repo: ai-openshell/sdk-go
58-
path: docs/src
59-
dev: { ref: main }
60-
versions:
61-
- { name: "0.1.9", ref: v0.1.9 }
62-
- { name: "0.1.8", ref: v0.1.8 }
63-
- { name: "0.1.7", ref: v0.1.7 }

‎topics/sdks.mdx‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)