Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,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
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ the docs, such as the landing page, in [`website/`](website/).
| Docset | Repository | Path | Dev branch |
| --------- | ------------------------------------------------------------------- | ----------- | ---------- |
| OpenShell | [ai-openshell/openshell](https://github.com/ai-openshell/openshell) | `docs/` | `main` |
| Go SDK | [ai-openshell/sdk-go](https://github.com/ai-openshell/sdk-go) | `docs/src/` | `main` |

## How it works

Expand All @@ -21,7 +20,7 @@ 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
Expand Down
15 changes: 9 additions & 6 deletions site/src/components/overrides/Header.astro
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -37,11 +38,13 @@ const subtabs = ds

<div class="os-header">
<Fragment set:html={bar} />
<nav class="os-tabs print:hidden" aria-label="Topics">
{topics.map((t) => (
<a href={t.href} class="os-tab" aria-current={t.isCurrent ? 'true' : undefined}>{t.label}</a>
))}
</nav>
{topics.length > 1 && (
<nav class="os-tabs print:hidden" aria-label="Topics">
{topics.map((t) => (
<a href={t.href} class="os-tab" aria-current={t.isCurrent ? 'true' : undefined}>{t.label}</a>
))}
</nav>
)}
{ds?.topic.landing && (
<div class="os-subtabs print:hidden">
<nav class="os-subtabs__links" aria-label={ds.topic.label}>
Expand Down
6 changes: 5 additions & 1 deletion site/src/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

/* layout */
--os-tabs-h: 2.75rem;
--sl-nav-height: calc(var(--os-header-h) + var(--os-tabs-h));
--sl-nav-height: var(--os-header-h);
--sl-nav-pad-x: 1.25rem;
--sl-sidebar-width: 17rem;
--sl-content-width: var(--os-content-w);
Expand Down Expand Up @@ -207,6 +207,10 @@ body {
color: var(--os-muted);
}

/* Topic tabs show only when there are several topics (Header.astro) */
html:has(.os-tabs) {
--sl-nav-height: calc(var(--os-header-h) + var(--os-tabs-h));
}
.os-tabs {
display: flex;
gap: 1.5rem;
Expand Down
19 changes: 1 addition & 18 deletions sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# The format of each checkout is detected: docs/docset.yml (native),
# docs/index.yml (Fern) or SUMMARY.md (mdBook). Old tags build as they are.
#
# Topics are the header tabs. A topic with a `description` or several sources
# Topics are the header tabs, shown when there are several. A topic with a `description` or several sources
# gets an overview page at /<id>/ (with an optional `intro` from this repo) and
# sub-tabs for the overview and each source. Otherwise its tab opens its only
# source.
Expand All @@ -31,11 +31,6 @@ topics:
- id: core
label: Core
sources: [core]
- id: sdks
label: SDKs
description: Client libraries for the OpenShell gateway API.
intro: topics/sdks.mdx
sources: [sdk-go]

sources:
core:
Expand All @@ -49,15 +44,3 @@ sources:
- { name: "0.1.9", ref: v0.1.9 }
- { name: "0.1.8", ref: v0.1.8 }
- { name: "0.1.7", ref: v0.1.7 }

sdk-go:
title: Go SDK
description: Go client for services and command-line tools.
mount: sdks/go
repo: ai-openshell/sdk-go
path: docs/src
dev: { ref: main }
versions:
- { name: "0.1.9", ref: v0.1.9 }
- { name: "0.1.8", ref: v0.1.8 }
- { name: "0.1.7", ref: v0.1.7 }
6 changes: 0 additions & 6 deletions topics/sdks.mdx

This file was deleted.

Loading