diff --git a/archive/templates/galley/README.md b/archive/templates/galley/README.md deleted file mode 100644 index ba38899..0000000 --- a/archive/templates/galley/README.md +++ /dev/null @@ -1,157 +0,0 @@ -# Galley — @inkform/theme-galley - -Galley is Inkform's own design system, built on `@inkform/framework`. Warm -opaque paper + ink, one editorial "Proof" red-pencil accent, a serif prose -voice (Newsreader) beside a mono machine voice (JetBrains Mono) and a sans UI -voice (General Sans). Depth comes from paper layering and hairlines, never -heavy shadow or gradient. It supports Guides + API Reference tabs, plus Blog -and Changelog, out of the box. - ---- - -## Run locally - -```bash -npm install -npm run dev -# → http://localhost:3000 -``` - -If this is a fresh clone, copy the env file first: - -```bash -cp .env.example .env.local -# Edit NEXT_PUBLIC_SITE_URL if needed, then: -npm run dev -``` - ---- - -## Add content - -All content lives in `content/docs/`. - -### Navigation — `content/docs/docs.json` - -`docs.json` controls the site name, logo, tabs, and page hierarchy: - -```jsonc -{ - "name": "Your Docs", - "tabs": [ - { - "tab": "Guides", - "navigation": [ - { - "group": "Get Started", - "pages": [ - { "title": "Introduction", "slug": "", "file": "index.mdx" }, - { "title": "Quickstart", "slug": "quickstart", "file": "quickstart.mdx" } - ] - } - ] - }, - { "tab": "API Reference", "openapi": "openapi.json" } - ] -} -``` - -- `slug` is the URL path (empty string = the index `/`). -- `file` is the MDX file path relative to `content/docs/`. -- The `openapi` field on a tab points to a JSON/YAML spec file in `content/docs/`. - -### Writing MDX - -Add `.mdx` files under `content/docs/` and register them in `docs.json`. -Galley supports all built-in blocks: ``, ``, ``, ``, -``, ``, ``, ``, ``, ``, -``, ``, ``, and more. - -### API Reference - -Replace `content/docs/openapi.json` with your own OpenAPI 3.x spec (JSON or -YAML). The site auto-generates a sidebar and per-operation pages. No extra -configuration needed — just point the `openapi` tab field at your spec file. - -### Blog and Changelog - -Both ship wired and ready — `/blog` (list + post pages) and `/changelog` -(single dated list) render automatically once you add content: - -``` -content/ - blog/ - my-first-post.mdx # frontmatter: title, date, author, tags, description - series.json # optional — group posts into a series - changelog/ - 2026-01-15-v1.mdx # frontmatter: title, date, version -``` - -Both nav links only appear once at least one entry exists — an empty -`content/blog`/`content/changelog` (or no folder at all) keeps the top nav -clean and the pages still render a "no posts yet" state if visited directly. - ---- - -## Maintain - -### Slug redirects - -When a page's URL changes, record the old → new slug mapping in -`content/docs/slug-history.json` to issue a 301 redirect: - -```json -{ - "old-page-slug": "new-page-slug", - "essentials/old-name": "essentials/new-name" -} -``` - -### Ask AI widget - -The Ask AI button is built in but **disabled by default**. Enable it by setting -`NEXT_PUBLIC_DOCS_AI_ENABLED=true` in `.env.local`. Wire up a real LLM provider -in `app/api/ask/route.ts` (see the TODO comment there; currently returns a stub). - ---- - -## Deploy to Vercel - -1. Push this directory (or the whole monorepo) to a GitHub repository. -2. In the Vercel dashboard, click **Add New → Project** and import the repo. -3. **Framework preset**: Next.js. -4. **Root directory**: set to the path of this folder if deploying as a - standalone (e.g. `oss/templates/galley`), or leave blank if deploying the - directory itself. -5. Add the environment variable `NEXT_PUBLIC_SITE_URL` (your production URL, - e.g. `https://docs.example.com`). -6. Click **Deploy**. - -For a custom domain, go to **Settings → Domains** in your Vercel project and add -your domain. Vercel handles SSL automatically. - ---- - -## Deploy to AWS Amplify - -1. Connect the repo in the Amplify console. -2. Set the **Build settings** manually if auto-detection picks the wrong preset: - - **Build command**: `npm ci && npm run build` - - **Output directory**: `.next` - - **Framework**: Next.js (SSR) -3. Add the `NEXT_PUBLIC_SITE_URL` environment variable under - **Environment variables**. -4. Deploy. Amplify Hosting supports Next.js SSR/ISR natively since Gen 2. - ---- - -## Ask AI (deferred) - -The `` widget in the top bar is built in. To activate it: - -1. Set `NEXT_PUBLIC_DOCS_AI_ENABLED=true`. -2. Implement the LLM call in `app/api/ask/route.ts`. -3. Add `ANTHROPIC_API_KEY` (or your provider key) as a server-side env var. - -The widget renders in both enabled and disabled states — it just shows an -informational notice when disabled. diff --git a/archive/templates/galley/app/layout.tsx b/archive/templates/galley/app/layout.tsx deleted file mode 100644 index e84db3c..0000000 --- a/archive/templates/galley/app/layout.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import type { Metadata } from 'next'; -import { Newsreader, JetBrains_Mono } from 'next/font/google'; -import '@inkform/framework/styles.css'; -import './theme.css'; -import { themeInitScript } from '@inkform/framework/theme-toggle'; -import { loadDocsConfig } from '@inkform/framework/content'; - -// Two-voice typography: Newsreader is the human/prose voice (display + -// long-form reading), General Sans is the UI voice (loaded via a tag -// in below — it's a Fontshare font, not on Google Fonts, so it can't -// go through next/font/google), JetBrains Mono is the machine voice (anything -// Git touches: paths, hashes, commits, code). Matches the Galley design -// system's own font stack exactly (see the inkform-design skill). -const newsreader = Newsreader({ - subsets: ['latin'], - style: ['normal', 'italic'], - variable: '--font-heading', - display: 'swap', -}); - -const jetbrainsMono = JetBrains_Mono({ - subsets: ['latin'], - variable: '--font-mono', - display: 'swap', -}); - -export async function generateMetadata(): Promise { - const config = loadDocsConfig(); - const name = config?.name ?? 'Galley Docs'; - return { - title: { default: name, template: `%s · ${name}` }, - description: `Documentation for ${name}`, - icons: { icon: config?.favicon ?? '/favicon.svg' }, - }; -} - -export default function RootLayout({ children }: { children: React.ReactNode }) { - return ( - - - {/* No-flash theme init — must run synchronously before first paint */} -