Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
458 changes: 180 additions & 278 deletions bun.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@
"@types/semver": "7.7.1",
"@tsconfig/node22": "22.0.2",
"@tsconfig/bun": "1.0.9",
"@astrojs/starlight": "0.41.11",
"@cloudflare/workers-types": "4.20251008.0",
"@pierre/diffs": "1.6.1",
"@pierre/highlights": "0.2.0",
"astro": "7.3.8",
"@solid-primitives/event-listener": "2.4.6",
"@solid-primitives/media": "2.3.6",
"@solid-primitives/resize-observer": "2.2.0",
Expand Down Expand Up @@ -156,6 +158,8 @@
"bun-types": "1.4.4",
"effect": "catalog:",
"open": "11.0.4",
"astro": "catalog:",
"@astrojs/starlight": "catalog:",
"solid-js": "catalog:"
},
"patchedDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/posts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "7.0.5",
"@fontsource/commit-mono": "5.3.0",
"astro": "7.3.8"
"astro": "catalog:"
},
"devDependencies": {
"@astrojs/cloudflare": "14.1.4",
Expand Down
2 changes: 2 additions & 0 deletions packages/web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
dist/
# generated types
.astro/
# local Cloudflare state
.wrangler/

# dependencies
node_modules/
Expand Down
14 changes: 10 additions & 4 deletions packages/web/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import solidJs from "@astrojs/solid-js"
import cloudflare from "@astrojs/cloudflare"
import theme from "toolbeam-docs-theme"
import config from "./config.mjs"
import { rehypeHeadingIds } from "@astrojs/markdown-remark"
import { rehypeHeadingIds, unified } from "@astrojs/markdown-remark"
import rehypeAutolinkHeadings from "rehype-autolink-headings"
import { copyFileSync } from "fs"
import { execFileSync } from "child_process"
Expand All @@ -16,7 +16,11 @@ export default defineConfig({
base: "/docs",
output: "server",
adapter: cloudflare({
configPath: process.env.SST_WRANGLER_PATH,
imageService: "passthrough",
// toolbeam-docs-theme passes its options to components through globalThis, which only works when pages
// prerender in the same Node process as the config.
prerenderEnvironment: "node",
}),
devToolbar: {
enabled: false,
Expand All @@ -25,7 +29,9 @@ export default defineConfig({
host: "0.0.0.0",
},
markdown: {
rehypePlugins: [rehypeHeadingIds, [rehypeAutolinkHeadings, { behavior: "wrap" }]],
processor: unified({
rehypePlugins: [rehypeHeadingIds, [rehypeAutolinkHeadings, { behavior: "wrap" }]],
}),
},
build: {},
integrations: [
Expand Down Expand Up @@ -327,9 +333,9 @@ function configSchema() {
name: "configSchema",
hooks: {
"astro:build:done": async () => {
execFileSync("bun", ["../schema/script/config-schema.ts", "./dist/config.json"], { stdio: "inherit" })
execFileSync("bun", ["../schema/script/config-schema.ts", "./dist/client/config.json"], { stdio: "inherit" })
// The V1 TUI schema is frozen in the console app since packages/opencode lives on the v1 branch.
copyFileSync("../console/app/public/tui.json", "./dist/tui.json")
copyFileSync("../console/app/public/tui.json", "./dist/client/tui.json")
},
},
}
Expand Down
12 changes: 6 additions & 6 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/cloudflare": "12.6.3",
"@astrojs/markdown-remark": "6.3.1",
"@astrojs/solid-js": "5.1.0",
"@astrojs/starlight": "0.34.3",
"@astrojs/cloudflare": "14.1.4",
"@astrojs/markdown-remark": "7.3.2",
"@astrojs/solid-js": "7.1.0",
"@astrojs/starlight": "catalog:",
"@fontsource/ibm-plex-mono": "5.2.5",
"@solid-primitives/resize-observer": "catalog:",
"@types/luxon": "catalog:",
"astro": "5.7.13",
"astro": "catalog:",
"diff": "catalog:",
"js-base64": "3.7.7",
"lang-map": "0.4.0",
Expand All @@ -34,7 +34,7 @@
},
"devDependencies": {
"@types/node": "catalog:",
"@astrojs/check": "0.9.6",
"@astrojs/check": "0.9.11",
"typescript": "catalog:"
}
}
4 changes: 2 additions & 2 deletions packages/web/src/components/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import Default from '@astrojs/starlight/components/Hero.astro';
import Lander from './Lander.astro';

const { slug } = Astro.locals.starlightRoute.entry;
const { id } = Astro.locals.starlightRoute.entry;
Comment thread
rekram1-node marked this conversation as resolved.
Resolved
---

{ slug === ""
{ id === ""
? <Lander {...Astro.props} />
: <Default {...Astro.props}><slot /></Default>
}
3 changes: 2 additions & 1 deletion packages/web/src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineCollection, z } from "astro:content"
import { defineCollection } from "astro:content"
import { z } from "astro/zod"
import { docsLoader, i18nLoader } from "@astrojs/starlight/loaders"
import { docsSchema, i18nSchema } from "@astrojs/starlight/schema"
import en from "./content/i18n/en.json"
Expand Down
29 changes: 16 additions & 13 deletions packages/web/src/pages/s/[id].astro
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,20 @@ const ogImage = `${config.socialCard}/opencode-share/${encodedTitle}.png?model=$
}}
>
<Share id={id} api={apiUrl} info={data.info} messages={messages} client:only="solid" />
{/* Inline so these page-wide overrides can't end up in a stylesheet shared with docs pages. */}
<style is:inline>
body > .page > .main-frame .main-pane > main > .content-panel:first-of-type {
display: none;
}
body > .page > .main-frame .main-pane > main {
padding: 0;
}
body > .page > .main-frame .main-pane > main > .content-panel + .content-panel {
border-top: none !important;
padding: 0;
}
.sl-markdown-content > astro-island > :first-child {
margin-top: 0;
}
</style>
</StarlightPage>

<style is:global>
body > .page > .main-frame .main-pane > main > .content-panel:first-of-type {
display: none;
}
body > .page > .main-frame .main-pane > main {
padding: 0;
}
body > .page > .main-frame .main-pane > main > .content-panel + .content-panel {
border-top: none !important;
padding: 0;
}
</style>
2 changes: 1 addition & 1 deletion services/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@astrojs/mdx": "7.0.5",
"astro": "7.3.8"
"astro": "catalog:"
},
"devDependencies": {
"@astrojs/cloudflare": "14.1.4",
Expand Down
Loading