* feat(docs): version Docusaurus site and align llms-full with snapshots Add docs version 1.0.0, version dropdown, lastVersion defaulting to stable, merged markdown config, and RELEASING steps for future doc snapshots. generate-llms-full.sh reads the latest entry in versions.json. README links the published documentation site. Closes #2644 Made-with: Cursor * fix(docs): update org URLs to gastownhall and refresh 1.0.0 snapshot - Update default orgName in docusaurus.config.ts from steveyegge to gastownhall to match the repo's new home - Update hardcoded steveyegge URLs in generate-llms-full.sh - Refresh versioned_docs 1.0.0 snapshot to include quickstart changes from #3032 which merged after the original snapshot was taken - Regenerate llms-full.txt with corrected URLs and updated content Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: matt wilkie <maphew@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
211 lines
5.5 KiB
TypeScript
211 lines
5.5 KiB
TypeScript
import {themes as prismThemes} from 'prism-react-renderer';
|
|
import type {Config} from '@docusaurus/types';
|
|
import type * as Preset from '@docusaurus/preset-classic';
|
|
|
|
// Environment-based URL configuration for fork flexibility
|
|
// SITE_URL: Full URL (e.g., "https://myuser.github.io/beads" or "https://myuser.github.io")
|
|
// ORG_NAME: GitHub organization/user name (defaults to "steveyegge")
|
|
// PROJECT_NAME: Repository/project name (defaults to "beads")
|
|
const orgName = process.env.ORG_NAME || 'gastownhall';
|
|
const projectName = process.env.PROJECT_NAME || 'beads';
|
|
const siteUrlEnv = process.env.SITE_URL || `https://${orgName}.github.io/${projectName}`;
|
|
|
|
// Parse SITE_URL into origin (url) and pathname (baseUrl)
|
|
function parseUrl(fullUrl: string): { origin: string; baseUrl: string } {
|
|
try {
|
|
const parsed = new URL(fullUrl);
|
|
const baseUrl = parsed.pathname === '/' ? `/${projectName}/` :
|
|
parsed.pathname.endsWith('/') ? parsed.pathname : `${parsed.pathname}/`;
|
|
return { origin: parsed.origin, baseUrl };
|
|
} catch {
|
|
return { origin: `https://${orgName}.github.io`, baseUrl: `/${projectName}/` };
|
|
}
|
|
}
|
|
|
|
const { origin: siteUrl, baseUrl } = parseUrl(siteUrlEnv);
|
|
|
|
const config: Config = {
|
|
title: 'Beads Documentation',
|
|
tagline: 'Dolt-powered issue tracker for AI-supervised coding workflows',
|
|
favicon: 'img/favicon.svg',
|
|
|
|
themes: ['@docusaurus/theme-mermaid'],
|
|
|
|
// future: {
|
|
// v4: true,
|
|
// },
|
|
|
|
// GitHub Pages deployment (environment-configurable)
|
|
url: siteUrl,
|
|
baseUrl: baseUrl,
|
|
organizationName: orgName,
|
|
projectName: projectName,
|
|
trailingSlash: false,
|
|
|
|
onBrokenLinks: 'warn',
|
|
|
|
markdown: {
|
|
mermaid: true,
|
|
hooks: {
|
|
onBrokenMarkdownLinks: 'warn',
|
|
},
|
|
},
|
|
|
|
i18n: {
|
|
defaultLocale: 'en',
|
|
locales: ['en'],
|
|
},
|
|
|
|
// Meta tags for AI agents (uses baseUrl for fork flexibility)
|
|
// Order: ai-terms (discovery), llms-full (complete docs), llms (index)
|
|
headTags: [
|
|
{
|
|
tagName: 'meta',
|
|
attributes: {
|
|
name: 'ai-terms',
|
|
content: `Load ${baseUrl}llms-full.txt (<50K tokens) for complete documentation, ${baseUrl}llms.txt for index`,
|
|
},
|
|
},
|
|
{
|
|
tagName: 'meta',
|
|
attributes: {
|
|
name: 'llms-full',
|
|
content: `${baseUrl}llms-full.txt`,
|
|
},
|
|
},
|
|
{
|
|
tagName: 'meta',
|
|
attributes: {
|
|
name: 'llms',
|
|
content: `${baseUrl}llms.txt`,
|
|
},
|
|
},
|
|
],
|
|
|
|
presets: [
|
|
[
|
|
'classic',
|
|
{
|
|
docs: {
|
|
routeBasePath: '/', // Docs as homepage
|
|
sidebarPath: './sidebars.ts',
|
|
editUrl: `https://github.com/${orgName}/${projectName}/tree/main/website/`,
|
|
showLastUpdateTime: true,
|
|
// Default site view is the latest released snapshot, not unreleased "Next"
|
|
lastVersion: '1.0.0',
|
|
versions: {
|
|
current: {
|
|
label: 'Next',
|
|
banner: 'unreleased',
|
|
},
|
|
},
|
|
},
|
|
blog: false, // Disable blog
|
|
theme: {
|
|
customCss: './src/css/custom.css',
|
|
},
|
|
} satisfies Preset.Options,
|
|
],
|
|
],
|
|
|
|
themeConfig: {
|
|
// No social card image - using default
|
|
colorMode: {
|
|
defaultMode: 'dark',
|
|
respectPrefersColorScheme: true,
|
|
},
|
|
navbar: {
|
|
title: 'Beads',
|
|
logo: {
|
|
alt: 'Beads Logo',
|
|
src: 'img/logo.svg',
|
|
},
|
|
items: [
|
|
{
|
|
type: 'docSidebar',
|
|
sidebarId: 'docsSidebar',
|
|
position: 'left',
|
|
label: 'Documentation',
|
|
},
|
|
{
|
|
type: 'docsVersionDropdown',
|
|
position: 'right',
|
|
},
|
|
{
|
|
href: `pathname://${baseUrl}llms.txt`,
|
|
label: 'llms.txt',
|
|
position: 'right',
|
|
},
|
|
{
|
|
href: `https://github.com/${orgName}/${projectName}`,
|
|
label: 'GitHub',
|
|
position: 'right',
|
|
},
|
|
],
|
|
},
|
|
footer: {
|
|
style: 'dark',
|
|
links: [
|
|
{
|
|
title: 'Documentation',
|
|
items: [
|
|
{
|
|
label: 'Getting Started',
|
|
to: '/getting-started/installation',
|
|
},
|
|
{
|
|
label: 'CLI Reference',
|
|
to: '/cli-reference',
|
|
},
|
|
{
|
|
label: 'Workflows',
|
|
to: '/workflows/molecules',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'Integrations',
|
|
items: [
|
|
{
|
|
label: 'Claude Code',
|
|
to: '/integrations/claude-code',
|
|
},
|
|
{
|
|
label: 'MCP Server',
|
|
to: '/integrations/mcp-server',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'Resources',
|
|
items: [
|
|
{
|
|
label: 'GitHub',
|
|
href: `https://github.com/${orgName}/${projectName}`,
|
|
},
|
|
{
|
|
label: 'llms.txt',
|
|
href: `pathname://${baseUrl}llms.txt`,
|
|
},
|
|
{
|
|
label: 'npm Package',
|
|
href: 'https://www.npmjs.com/package/@beads/bd',
|
|
},
|
|
{
|
|
label: 'PyPI (MCP)',
|
|
href: 'https://pypi.org/project/beads-mcp/',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
copyright: `Copyright © ${new Date().getFullYear()} Steve Yegge. Built with Docusaurus.`,
|
|
},
|
|
prism: {
|
|
theme: prismThemes.github,
|
|
darkTheme: prismThemes.dracula,
|
|
additionalLanguages: ['bash', 'json', 'toml', 'go'],
|
|
},
|
|
} satisfies Preset.ThemeConfig,
|
|
};
|
|
|
|
export default config;
|