create-claudecraft 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -178
- package/bin/cli.js +186 -1
- package/dist/answers.d.ts +269 -0
- package/dist/answers.js +215 -0
- package/dist/ink-prompts.d.ts +90 -12
- package/dist/ink-prompts.js +371 -330
- package/dist/lettering.d.ts +2 -0
- package/dist/lettering.js +28 -0
- package/lib/apps.mjs +141 -0
- package/lib/github.mjs +24 -0
- package/lib/init.mjs +153 -0
- package/lib/ports.mjs +56 -0
- package/lib/scaffold.mjs +218 -0
- package/lib/upgrade.mjs +164 -0
- package/package.json +39 -33
- package/templates/astro/.editorconfig +15 -0
- package/templates/astro/.env.example +2 -0
- package/templates/astro/.github/workflows/ci.yml +37 -0
- package/templates/astro/.github/workflows/deploy.yml +46 -0
- package/templates/astro/.nvmrc +1 -0
- package/templates/astro/.prettierignore +10 -0
- package/templates/astro/.prettierrc.json +7 -0
- package/templates/astro/.vscode/extensions.json +3 -0
- package/templates/astro/.vscode/settings.json +12 -0
- package/templates/astro/AGENTS.md +100 -0
- package/templates/astro/README.md +42 -0
- package/templates/astro/_CLAUDE.md +1 -0
- package/templates/astro/_claude/launch.json +13 -0
- package/templates/astro/_claude/settings.json +22 -0
- package/templates/astro/_codex/environments/environment.toml +20 -0
- package/templates/astro/_gitignore +31 -0
- package/templates/astro/_npmrc +8 -0
- package/templates/astro/_super.engineering/config.json +8 -0
- package/templates/astro/_zed/tasks.json +5 -0
- package/templates/astro/astro.config.mjs +111 -0
- package/templates/astro/docs/README.md +7 -0
- package/templates/astro/docs/decisions.md +3 -0
- package/templates/astro/docs/inbox.md +7 -0
- package/templates/astro/docs/kit/agent-apps.md +15 -0
- package/templates/astro/docs/kit/analytics.md +13 -0
- package/templates/astro/docs/kit/deploy.md +9 -0
- package/templates/astro/docs/kit/images.md +10 -0
- package/templates/astro/docs/kit/languages.md +8 -0
- package/templates/astro/docs/kit/local.md +16 -0
- package/templates/astro/docs/kit/seo.md +15 -0
- package/templates/astro/docs/kit/structure.md +40 -0
- package/templates/astro/docs/kit/upgrade.md +19 -0
- package/templates/astro/functions/_middleware.js +25 -0
- package/templates/astro/intent.md +40 -0
- package/templates/astro/package.json +46 -0
- package/templates/astro/public/_headers +17 -0
- package/templates/astro/public/_routes.json +5 -0
- package/templates/astro/public/apple-touch-icon.png +0 -0
- package/templates/astro/public/favicon-16.png +0 -0
- package/templates/astro/public/favicon-32.png +0 -0
- package/templates/astro/public/favicon.ico +0 -0
- package/templates/astro/public/favicon.svg +4 -0
- package/templates/astro/public/icon-192.png +0 -0
- package/templates/astro/public/icon-512.png +0 -0
- package/templates/astro/public/og-image.png +0 -0
- package/templates/astro/scripts/chrome.mjs +138 -0
- package/templates/astro/scripts/deploy.sh +69 -0
- package/templates/astro/scripts/generate-icons.mjs +73 -0
- package/templates/astro/scripts/generate-og.mjs +66 -0
- package/templates/astro/scripts/lint-copy.mjs +67 -0
- package/templates/astro/scripts/local-domain.mjs +115 -0
- package/templates/astro/scripts/markdown-pages.mjs +142 -0
- package/templates/astro/scripts/og-template.html +73 -0
- package/templates/astro/scripts/shared.mjs +33 -0
- package/templates/astro/scripts/verify-build.mjs +283 -0
- package/templates/astro/scripts/verify.mjs +19 -0
- package/templates/astro/site.config.mjs +85 -0
- package/templates/astro/src/components/Analytics.astro +49 -0
- package/templates/astro/src/components/Consent.astro +52 -0
- package/templates/astro/src/components/Counter.tsx +20 -0
- package/templates/astro/src/data/README.md +18 -0
- package/templates/astro/src/dev/styleguide.astro +43 -0
- package/templates/astro/src/env.d.ts +1 -0
- package/templates/astro/src/i18n/ar.json +29 -0
- package/templates/astro/src/i18n/de.json +29 -0
- package/templates/astro/src/i18n/en.json +29 -0
- package/templates/astro/src/i18n/es.json +29 -0
- package/templates/astro/src/i18n/fr.json +29 -0
- package/templates/astro/src/i18n/he.json +29 -0
- package/templates/astro/src/i18n/hi.json +29 -0
- package/templates/astro/src/i18n/index.ts +80 -0
- package/templates/astro/src/i18n/it.json +29 -0
- package/templates/astro/src/i18n/ja.json +29 -0
- package/templates/astro/src/i18n/ko.json +29 -0
- package/templates/astro/src/i18n/nl.json +29 -0
- package/templates/astro/src/i18n/pl.json +29 -0
- package/templates/astro/src/i18n/pt-br.json +29 -0
- package/templates/astro/src/i18n/ro.json +29 -0
- package/templates/astro/src/i18n/ru.json +29 -0
- package/templates/astro/src/i18n/sv.json +29 -0
- package/templates/astro/src/i18n/tr.json +29 -0
- package/templates/astro/src/i18n/uk.json +29 -0
- package/templates/astro/src/i18n/zh-cn.json +29 -0
- package/templates/astro/src/layouts/BaseLayout.astro +205 -0
- package/templates/astro/src/lib/cn.ts +7 -0
- package/templates/astro/src/lib/consent.ts +32 -0
- package/templates/astro/src/lib/seo.ts +18 -0
- package/templates/astro/src/lib/theme.ts +5 -0
- package/templates/astro/src/pages/404.astro +7 -0
- package/templates/astro/src/pages/[...locale]/404.astro +25 -0
- package/templates/astro/src/pages/[...locale]/about.astro +25 -0
- package/templates/astro/src/pages/[...locale]/index.astro +30 -0
- package/templates/astro/src/pages/[...locale]/privacy.astro +28 -0
- package/templates/astro/src/pages/robots.txt.ts +16 -0
- package/templates/astro/src/pages/site.webmanifest.ts +26 -0
- package/templates/astro/src/styles/global.css +163 -0
- package/templates/astro/t3.json +22 -0
- package/templates/astro/tsconfig.json +13 -0
- package/templates/astro/wrangler.toml +8 -0
- package/templates/react/.editorconfig +15 -0
- package/templates/react/.env.example +2 -0
- package/templates/react/.nvmrc +1 -0
- package/templates/react/.prettierignore +11 -0
- package/templates/react/.prettierrc.json +5 -0
- package/templates/react/.vscode/extensions.json +3 -0
- package/templates/react/.vscode/settings.json +4 -0
- package/templates/react/AGENTS.md +64 -0
- package/templates/react/README.md +31 -0
- package/templates/react/_CLAUDE.md +1 -0
- package/templates/react/_claude/launch.json +13 -0
- package/templates/react/_claude/settings.json +21 -0
- package/templates/react/_codex/environments/environment.toml +20 -0
- package/templates/react/_gitignore +17 -0
- package/templates/react/_npmrc +8 -0
- package/templates/react/_super.engineering/config.json +8 -0
- package/templates/react/_zed/tasks.json +5 -0
- package/templates/react/docs/decisions.md +3 -0
- package/templates/react/docs/inbox.md +7 -0
- package/templates/react/index.html +14 -0
- package/templates/react/package.json +47 -0
- package/templates/react/public/favicon.svg +5 -0
- package/templates/react/scripts/lint-copy.mjs +46 -0
- package/templates/react/scripts/lint-tokens.mjs +44 -0
- package/templates/react/scripts/local-domain.mjs +115 -0
- package/templates/react/scripts/verify.mjs +20 -0
- package/templates/react/site.config.mjs +23 -0
- package/templates/react/src/App.test.tsx +15 -0
- package/templates/react/src/App.tsx +21 -0
- package/templates/react/src/components/ErrorBoundary.tsx +42 -0
- package/templates/react/src/components/SkipLink.tsx +10 -0
- package/templates/react/src/config/site.ts +5 -0
- package/templates/react/src/lib/cn.ts +7 -0
- package/templates/react/src/main.tsx +13 -0
- package/templates/react/src/pages/HomePage.tsx +71 -0
- package/templates/react/src/pages/NotFoundPage.tsx +21 -0
- package/templates/react/src/styles/global.css +96 -0
- package/templates/react/src/test-setup.ts +1 -0
- package/templates/react/t3.json +22 -0
- package/templates/{base → react}/tsconfig.json +3 -3
- package/templates/react/vite.config.ts +26 -0
- package/templates/shared/_claude/hooks/design-lint.mjs +67 -0
- package/templates/shared/_claude/skills/design-quality/SKILL.md +113 -0
- package/templates/shared/_claude/skills/design-quality/references/composition-palette.md +87 -0
- package/templates/shared/_claude/skills/design-quality/references/copy-tells.md +49 -0
- package/templates/shared/_claude/skills/design-quality/references/visual-critic.md +75 -0
- package/templates/shared/design.md +148 -0
- package/templates/shared/intent.md +28 -0
- package/dist/constants.d.ts +0 -71
- package/dist/constants.js +0 -128
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -229
- package/dist/prompts.d.ts +0 -16
- package/dist/prompts.js +0 -434
- package/dist/scaffold.d.ts +0 -19
- package/dist/scaffold.js +0 -303
- package/dist/ui.d.ts +0 -27
- package/dist/ui.js +0 -254
- package/templates/app/App.tsx +0 -21
- package/templates/base/CLAUDE.md +0 -332
- package/templates/base/eslint.config.js +0 -28
- package/templates/base/index.html +0 -17
- package/templates/base/package.json +0 -43
- package/templates/base/postcss.config.js +0 -6
- package/templates/base/tailwind.config.js +0 -81
- package/templates/base/vite.config.ts +0 -16
- package/templates/commands/brainstorm.md +0 -6
- package/templates/commands/build.md +0 -41
- package/templates/commands/execute-plan.md +0 -6
- package/templates/commands/lint.md +0 -41
- package/templates/commands/ralph.md +0 -113
- package/templates/commands/typecheck.md +0 -44
- package/templates/commands/write-plan.md +0 -6
- package/templates/components/ErrorBoundary.tsx +0 -49
- package/templates/components/ui/Button.tsx +0 -60
- package/templates/components/ui/CodeBlock.tsx +0 -46
- package/templates/components/ui/CopyCommand.tsx +0 -38
- package/templates/components/ui/FilePreview.tsx +0 -46
- package/templates/components/ui/SkipLink.tsx +0 -7
- package/templates/components/ui/ThemeSelector.tsx +0 -41
- package/templates/components/ui/UICarousel.tsx +0 -309
- package/templates/context/ThemeContext.tsx +0 -61
- package/templates/homepage/HomePage.tsx +0 -534
- package/templates/homepage/NotFoundPage.tsx +0 -17
- package/templates/hooks/README.md +0 -82
- package/templates/hooks/check-branch.js +0 -27
- package/templates/hooks/typecheck-after-edit.js +0 -51
- package/templates/index.css +0 -67
- package/templates/lib/utils.ts +0 -9
- package/templates/main.tsx +0 -16
- package/templates/settings/MCP_SETUP.md +0 -76
- package/templates/settings/settings.json +0 -16
- package/templates/settings/settings.local.json +0 -37
- package/templates/skills/design/a11y-audit/SKILL.md +0 -173
- package/templates/skills/design/design-polish/SKILL.md +0 -75
- package/templates/skills/design/figma-to-code/SKILL.md +0 -157
- package/templates/skills/design/json-ld/SKILL.md +0 -125
- package/templates/skills/design/microcopy/SKILL.md +0 -197
- package/templates/skills/design/og-image/SKILL.md +0 -157
- package/templates/skills/design/ralph-wiggum-loops/SKILL.md +0 -299
- package/templates/skills/design/react-best-practices/SKILL.md +0 -106
- package/templates/skills/design/react-best-practices/references/react-performance-guidelines.md +0 -143
- package/templates/skills/design/seo-review/SKILL.md +0 -96
- package/templates/skills/design/sitemap-generator/SKILL.md +0 -66
- package/templates/skills/design/testing-patterns/SKILL.md +0 -276
- package/templates/skills/design/ui-skills/SKILL.md +0 -85
- package/templates/skills/design/visual-iteration/SKILL.md +0 -88
- package/templates/skills/workflow/brainstorming/SKILL.md +0 -54
- package/templates/skills/workflow/dispatching-parallel-agents/SKILL.md +0 -180
- package/templates/skills/workflow/executing-plans/SKILL.md +0 -76
- package/templates/skills/workflow/finishing-a-development-branch/SKILL.md +0 -200
- package/templates/skills/workflow/receiving-code-review/SKILL.md +0 -213
- package/templates/skills/workflow/requesting-code-review/SKILL.md +0 -105
- package/templates/skills/workflow/requesting-code-review/code-reviewer.md +0 -146
- package/templates/skills/workflow/subagent-driven-development/SKILL.md +0 -240
- package/templates/skills/workflow/subagent-driven-development/code-quality-reviewer-prompt.md +0 -20
- package/templates/skills/workflow/subagent-driven-development/implementer-prompt.md +0 -78
- package/templates/skills/workflow/subagent-driven-development/spec-reviewer-prompt.md +0 -61
- package/templates/skills/workflow/systematic-debugging/CREATION-LOG.md +0 -119
- package/templates/skills/workflow/systematic-debugging/SKILL.md +0 -296
- package/templates/skills/workflow/systematic-debugging/condition-based-waiting-example.ts +0 -158
- package/templates/skills/workflow/systematic-debugging/condition-based-waiting.md +0 -115
- package/templates/skills/workflow/systematic-debugging/defense-in-depth.md +0 -122
- package/templates/skills/workflow/systematic-debugging/find-polluter.sh +0 -63
- package/templates/skills/workflow/systematic-debugging/root-cause-tracing.md +0 -169
- package/templates/skills/workflow/systematic-debugging/test-academic.md +0 -14
- package/templates/skills/workflow/systematic-debugging/test-pressure-1.md +0 -58
- package/templates/skills/workflow/systematic-debugging/test-pressure-2.md +0 -68
- package/templates/skills/workflow/systematic-debugging/test-pressure-3.md +0 -69
- package/templates/skills/workflow/test-driven-development/SKILL.md +0 -371
- package/templates/skills/workflow/test-driven-development/testing-anti-patterns.md +0 -299
- package/templates/skills/workflow/using-git-worktrees/SKILL.md +0 -217
- package/templates/skills/workflow/using-superpowers/SKILL.md +0 -87
- package/templates/skills/workflow/verification-before-completion/SKILL.md +0 -139
- package/templates/skills/workflow/writing-plans/SKILL.md +0 -116
- package/templates/skills/workflow/writing-skills/SKILL.md +0 -655
- package/templates/skills/workflow/writing-skills/anthropic-best-practices.md +0 -1150
- package/templates/skills/workflow/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
- package/templates/skills/workflow/writing-skills/graphviz-conventions.dot +0 -172
- package/templates/skills/workflow/writing-skills/persuasion-principles.md +0 -187
- package/templates/skills/workflow/writing-skills/render-graphs.js +0 -168
- package/templates/skills/workflow/writing-skills/testing-skills-with-subagents.md +0 -384
- package/templates/types/index.ts +0 -17
- /package/templates/{vite-env.d.ts → react/src/vite-env.d.ts} +0 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@/styles/global.css';
|
|
3
|
+
import Analytics from '@/components/Analytics.astro';
|
|
4
|
+
import Consent from '@/components/Consent.astro';
|
|
5
|
+
import { absolute, canonicalUrl, jsonLd, organizationId, websiteId, type GraphNode } from '@/lib/seo';
|
|
6
|
+
import { copy, defaultLocale, locales, meta, pagePath, siteNameFor, versions } from '@/i18n';
|
|
7
|
+
import { colors } from '@/lib/theme';
|
|
8
|
+
import { darkMode, kit, modified, published, publisher, siteName, tracked } from '../../site.config.mjs';
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
/** Locale code from site.config.mjs. Pages in src/pages/[...locale]/ pass theirs. */
|
|
14
|
+
locale?: string;
|
|
15
|
+
noindex?: boolean;
|
|
16
|
+
/** Extra nodes for the page's single JSON-LD @graph. */
|
|
17
|
+
graph?: GraphNode[];
|
|
18
|
+
pageType?: 'WebPage' | 'AboutPage';
|
|
19
|
+
/** Path under /public for the share card, 1200×630, PNG or JPEG. */
|
|
20
|
+
ogImage?: string;
|
|
21
|
+
ogAlt?: string;
|
|
22
|
+
dateModified?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const {
|
|
26
|
+
title,
|
|
27
|
+
description,
|
|
28
|
+
locale = defaultLocale,
|
|
29
|
+
noindex = false,
|
|
30
|
+
graph = [],
|
|
31
|
+
pageType = 'WebPage',
|
|
32
|
+
ogImage = '/og-image.png',
|
|
33
|
+
ogAlt,
|
|
34
|
+
dateModified = modified,
|
|
35
|
+
} = Astro.props;
|
|
36
|
+
|
|
37
|
+
if (!Astro.site) throw new Error('Set site in astro.config.mjs before building.');
|
|
38
|
+
const site = Astro.site;
|
|
39
|
+
const ui = copy(locale);
|
|
40
|
+
const { hreflang, dir, ogLocale, font } = meta(locale);
|
|
41
|
+
const canonical = canonicalUrl(Astro.url.pathname, site);
|
|
42
|
+
const path = pagePath(new URL(canonical).pathname);
|
|
43
|
+
const is404 = path === '/404/';
|
|
44
|
+
const indexable = !noindex && !is404;
|
|
45
|
+
const pageTitle = title.includes(siteName) ? title : `${title} · ${siteNameFor(locale)}`;
|
|
46
|
+
const og = absolute(ogImage, site);
|
|
47
|
+
const [accent, accentDark = accent] = colors('accent');
|
|
48
|
+
|
|
49
|
+
// Every locale's version of this page (a 404 points each language at its home page).
|
|
50
|
+
const translations = locales.length > 1 ? versions(is404 ? '/' : path) : [];
|
|
51
|
+
const others = translations.filter((version) => version.locale !== locale);
|
|
52
|
+
const linkTranslations = indexable && translations.length > 0;
|
|
53
|
+
const defaultUrl = translations.find((version) => version.locale === defaultLocale)?.url;
|
|
54
|
+
|
|
55
|
+
const fullGraph: GraphNode[] = [
|
|
56
|
+
{
|
|
57
|
+
'@type': 'WebSite',
|
|
58
|
+
'@id': websiteId(site),
|
|
59
|
+
name: siteName,
|
|
60
|
+
url: site.href,
|
|
61
|
+
inLanguage: translations.length ? translations.map((version) => version.hreflang) : hreflang,
|
|
62
|
+
publisher: { '@id': organizationId(site) },
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
'@type': 'Organization',
|
|
66
|
+
'@id': organizationId(site),
|
|
67
|
+
name: publisher.name || siteName,
|
|
68
|
+
url: publisher.url || site.href,
|
|
69
|
+
...(publisher.sameAs.length > 0 && { sameAs: publisher.sameAs }),
|
|
70
|
+
// The icon is the site's own: it is the publisher's logo only when the site publishes itself.
|
|
71
|
+
...(!publisher.name && {
|
|
72
|
+
logo: {
|
|
73
|
+
'@type': 'ImageObject',
|
|
74
|
+
url: absolute('/icon-512.png', site),
|
|
75
|
+
width: 512,
|
|
76
|
+
height: 512,
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
'@type': pageType,
|
|
82
|
+
'@id': `${canonical}#webpage`,
|
|
83
|
+
url: canonical,
|
|
84
|
+
name: pageTitle,
|
|
85
|
+
description,
|
|
86
|
+
inLanguage: hreflang,
|
|
87
|
+
isPartOf: { '@id': websiteId(site) },
|
|
88
|
+
datePublished: published,
|
|
89
|
+
dateModified,
|
|
90
|
+
primaryImageOfPage: {
|
|
91
|
+
'@type': 'ImageObject',
|
|
92
|
+
url: og,
|
|
93
|
+
width: 1200,
|
|
94
|
+
height: 630,
|
|
95
|
+
},
|
|
96
|
+
...(linkTranslations &&
|
|
97
|
+
(locale === defaultLocale
|
|
98
|
+
? { workTranslation: others.map((version) => ({ '@id': `${version.url}#webpage` })) }
|
|
99
|
+
: { translationOfWork: { '@id': `${defaultUrl}#webpage` } })),
|
|
100
|
+
},
|
|
101
|
+
...graph,
|
|
102
|
+
];
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
<!doctype html>
|
|
106
|
+
<html lang={hreflang} dir={dir} data-font={font} data-theme={darkMode ? 'auto' : undefined}>
|
|
107
|
+
<head>
|
|
108
|
+
<meta charset="utf-8" />
|
|
109
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
110
|
+
<meta name="generator" content={Astro.generator} />
|
|
111
|
+
{kit && <meta name="claudecraft" content={kit} />}
|
|
112
|
+
<meta name="color-scheme" content={darkMode ? 'light dark' : 'light'} />
|
|
113
|
+
<meta
|
|
114
|
+
name="theme-color"
|
|
115
|
+
content={accent}
|
|
116
|
+
media={darkMode ? '(prefers-color-scheme: light)' : undefined}
|
|
117
|
+
/>
|
|
118
|
+
{darkMode && <meta name="theme-color" content={accentDark} media="(prefers-color-scheme: dark)" />}
|
|
119
|
+
<title>{pageTitle}</title>
|
|
120
|
+
<meta name="description" content={description} />
|
|
121
|
+
<meta name="robots" content={indexable ? 'index, follow, max-image-preview:large' : 'noindex, follow'} />
|
|
122
|
+
{!is404 && <link rel="canonical" href={canonical} />}
|
|
123
|
+
{linkTranslations &&
|
|
124
|
+
translations.map((version) => <link rel="alternate" hreflang={version.hreflang} href={version.url} />)}
|
|
125
|
+
{linkTranslations && <link rel="alternate" hreflang="x-default" href={defaultUrl} />}
|
|
126
|
+
<link rel="icon" href="/favicon.ico" sizes="any" />
|
|
127
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
128
|
+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png" />
|
|
129
|
+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png" />
|
|
130
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
131
|
+
<link rel="manifest" href="/site.webmanifest" />
|
|
132
|
+
<link rel="sitemap" type="application/xml" href="/sitemap-index.xml" />
|
|
133
|
+
{indexable && (
|
|
134
|
+
<link rel="alternate" type="text/markdown" href={`${new URL(canonical).pathname}index.md`} />
|
|
135
|
+
)}
|
|
136
|
+
<meta property="og:type" content="website" />
|
|
137
|
+
<meta property="og:site_name" content={siteName} />
|
|
138
|
+
<meta property="og:locale" content={ogLocale} />
|
|
139
|
+
{others.map((version) => (
|
|
140
|
+
<meta property="og:locale:alternate" content={version.ogLocale} />
|
|
141
|
+
))}
|
|
142
|
+
<meta property="og:title" content={pageTitle} />
|
|
143
|
+
<meta property="og:description" content={description} />
|
|
144
|
+
{!is404 && <meta property="og:url" content={canonical} />}
|
|
145
|
+
<meta property="og:image" content={og} />
|
|
146
|
+
<meta property="og:image:type" content={/\.jpe?g$/.test(ogImage) ? 'image/jpeg' : 'image/png'} />
|
|
147
|
+
<meta property="og:image:width" content="1200" />
|
|
148
|
+
<meta property="og:image:height" content="630" />
|
|
149
|
+
<meta property="og:image:alt" content={ogAlt ?? ui.ogAlt} />
|
|
150
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
151
|
+
<meta name="twitter:title" content={pageTitle} />
|
|
152
|
+
<meta name="twitter:description" content={description} />
|
|
153
|
+
<meta name="twitter:image" content={og} />
|
|
154
|
+
<meta name="twitter:image:alt" content={ogAlt ?? ui.ogAlt} />
|
|
155
|
+
<script
|
|
156
|
+
is:inline
|
|
157
|
+
type="application/ld+json"
|
|
158
|
+
set:html={jsonLd({ '@context': 'https://schema.org', '@graph': fullGraph })}
|
|
159
|
+
/>
|
|
160
|
+
<Analytics />
|
|
161
|
+
</head>
|
|
162
|
+
<body>
|
|
163
|
+
<a
|
|
164
|
+
href="#main"
|
|
165
|
+
class="sr-only focus:not-sr-only focus:fixed focus:start-4 focus:top-4 focus:z-50 focus:bg-[var(--color-ink)] focus:px-3 focus:py-2 focus:text-sm focus:text-[var(--color-paper)]"
|
|
166
|
+
>
|
|
167
|
+
{ui.skipToContent}
|
|
168
|
+
</a>
|
|
169
|
+
<slot />
|
|
170
|
+
{(translations.length > 0 || tracked) && (
|
|
171
|
+
<footer class="mx-auto flex w-full max-w-xl flex-wrap justify-between gap-x-8 gap-y-2 px-6 pb-10 text-sm">
|
|
172
|
+
{translations.length > 0 && (
|
|
173
|
+
<nav aria-label={ui.language}>
|
|
174
|
+
<ul class="flex flex-wrap gap-x-4 gap-y-2">
|
|
175
|
+
{translations.map((version) => (
|
|
176
|
+
<li>
|
|
177
|
+
<a
|
|
178
|
+
href={version.path}
|
|
179
|
+
hreflang={version.hreflang}
|
|
180
|
+
lang={version.hreflang}
|
|
181
|
+
data-font={version.font}
|
|
182
|
+
aria-current={version.locale === locale ? 'page' : undefined}
|
|
183
|
+
class="aria-[current=page]:no-underline"
|
|
184
|
+
>
|
|
185
|
+
{version.name}
|
|
186
|
+
</a>
|
|
187
|
+
</li>
|
|
188
|
+
))}
|
|
189
|
+
</ul>
|
|
190
|
+
</nav>
|
|
191
|
+
)}
|
|
192
|
+
{tracked && (
|
|
193
|
+
<button
|
|
194
|
+
type="button"
|
|
195
|
+
data-consent="open"
|
|
196
|
+
class="cursor-pointer underline decoration-[var(--color-accent)] underline-offset-[0.18em]"
|
|
197
|
+
>
|
|
198
|
+
{ui.consentOpen}
|
|
199
|
+
</button>
|
|
200
|
+
)}
|
|
201
|
+
</footer>
|
|
202
|
+
)}
|
|
203
|
+
{tracked && <Consent locale={locale} />}
|
|
204
|
+
</body>
|
|
205
|
+
</html>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// The visitor's answer about analytics cookies, kept in this browser. 'yes' lets Google Analytics
|
|
2
|
+
// and Microsoft Clarity set cookies and know a returning visitor; 'no' or no answer keeps both
|
|
3
|
+
// without cookies. Advertising storage is never allowed.
|
|
4
|
+
export const CONSENT_KEY = 'consent';
|
|
5
|
+
export type Answer = 'yes' | 'no';
|
|
6
|
+
|
|
7
|
+
declare global {
|
|
8
|
+
interface Window {
|
|
9
|
+
gtag?: (...args: unknown[]) => void;
|
|
10
|
+
clarity?: (...args: unknown[]) => void;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function answer(): Answer | null {
|
|
15
|
+
try {
|
|
16
|
+
const stored = localStorage.getItem(CONSENT_KEY);
|
|
17
|
+
return stored === 'yes' || stored === 'no' ? stored : null;
|
|
18
|
+
} catch {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function decide(choice: Answer) {
|
|
24
|
+
try {
|
|
25
|
+
localStorage.setItem(CONSENT_KEY, choice);
|
|
26
|
+
} catch {
|
|
27
|
+
// Private window: the answer lasts this page load.
|
|
28
|
+
}
|
|
29
|
+
const state = choice === 'yes' ? 'granted' : 'denied';
|
|
30
|
+
window.gtag?.('consent', 'update', { analytics_storage: state });
|
|
31
|
+
window.clarity?.('consentv2', { ad_Storage: 'denied', analytics_Storage: state });
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** JSON for a <script> block: "<" escaped so no string can close the tag. */
|
|
2
|
+
export const jsonLd = (value: unknown) => JSON.stringify(value).replace(/</g, '\\u003c');
|
|
3
|
+
|
|
4
|
+
export function canonicalUrl(path: string, site: URL) {
|
|
5
|
+
const url = new URL(path, site);
|
|
6
|
+
url.search = '';
|
|
7
|
+
url.hash = '';
|
|
8
|
+
// trailingSlash: 'always'
|
|
9
|
+
if (!url.pathname.endsWith('/')) url.pathname += '/';
|
|
10
|
+
return url.href;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const absolute = (path: string, site: URL) => new URL(path, site).href;
|
|
14
|
+
|
|
15
|
+
export const websiteId = (site: URL) => absolute('/#website', site);
|
|
16
|
+
export const organizationId = (site: URL) => absolute('/#organization', site);
|
|
17
|
+
|
|
18
|
+
export type GraphNode = Record<string, unknown>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import css from '@/styles/global.css?raw';
|
|
2
|
+
|
|
3
|
+
/** Every value of a --color-<name> token in global.css: the light one first, then the dark one. */
|
|
4
|
+
export const colors = (name: string) =>
|
|
5
|
+
[...css.matchAll(new RegExp(`--color-${name}:\\s*([^;]+);`, 'g'))].map(([, value]) => value.trim());
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Builds /<code>/404.html for the other locales (see notFoundPages in astro.config.mjs).
|
|
3
|
+
// The default locale's is src/pages/404.astro, which renders this page.
|
|
4
|
+
import BaseLayout from '@/layouts/BaseLayout.astro';
|
|
5
|
+
import { copy, defaultLocale, localePath, localeStaticPaths } from '@/i18n';
|
|
6
|
+
|
|
7
|
+
export const getStaticPaths = () => localeStaticPaths().filter(({ props }) => props.locale !== defaultLocale);
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
locale: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { locale } = Astro.props;
|
|
14
|
+
const ui = copy(locale);
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<BaseLayout locale={locale} title={ui.notFoundTitle} description={ui.notFoundBody} noindex>
|
|
18
|
+
<main id="main" class="mx-auto flex w-full max-w-xl flex-1 flex-col justify-center gap-4 px-6 py-16">
|
|
19
|
+
<h1 class="text-3xl">{ui.notFoundTitle}</h1>
|
|
20
|
+
<p class="text-[var(--color-muted)]">{ui.notFoundBody}</p>
|
|
21
|
+
<p class="text-sm">
|
|
22
|
+
<a href={localePath(locale)}>{ui.backHome}</a>
|
|
23
|
+
</p>
|
|
24
|
+
</main>
|
|
25
|
+
</BaseLayout>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
import BaseLayout from '@/layouts/BaseLayout.astro';
|
|
3
|
+
import { copy, localePath, localeStaticPaths } from '@/i18n';
|
|
4
|
+
|
|
5
|
+
export const getStaticPaths = localeStaticPaths;
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
locale: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { locale } = Astro.props;
|
|
12
|
+
const ui = copy(locale);
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<BaseLayout locale={locale} title={ui.aboutTitle} description={ui.aboutDescription} pageType="AboutPage">
|
|
16
|
+
<main id="main" class="mx-auto w-full max-w-xl flex-1 px-6 py-16">
|
|
17
|
+
<p class="mb-6 text-sm">
|
|
18
|
+
<a href={localePath(locale)}>{ui.backHome}</a>
|
|
19
|
+
</p>
|
|
20
|
+
<article class="space-y-3">
|
|
21
|
+
<h1 class="text-3xl">{ui.aboutTitle}</h1>
|
|
22
|
+
<p class="text-[var(--color-muted)]">{ui.description}</p>
|
|
23
|
+
</article>
|
|
24
|
+
</main>
|
|
25
|
+
</BaseLayout>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
import BaseLayout from '@/layouts/BaseLayout.astro';
|
|
3
|
+
import { copy, localePath, localeStaticPaths, siteNameFor } from '@/i18n';
|
|
4
|
+
import { siteName } from '../../../site.config.mjs';
|
|
5
|
+
|
|
6
|
+
export const getStaticPaths = localeStaticPaths;
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
locale: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { locale } = Astro.props;
|
|
13
|
+
const ui = copy(locale);
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<BaseLayout locale={locale} title={siteNameFor(locale)} description={ui.description}>
|
|
17
|
+
<main id="main" class="mx-auto flex w-full max-w-xl flex-1 flex-col justify-center gap-8 px-6 py-16">
|
|
18
|
+
<header class="motion-rise space-y-4">
|
|
19
|
+
<h1 class="text-4xl sm:text-5xl">
|
|
20
|
+
<bdi>{siteName}</bdi>
|
|
21
|
+
</h1>
|
|
22
|
+
<div class="motion-rule h-px w-24 bg-[var(--color-accent)]" aria-hidden="true"></div>
|
|
23
|
+
<p class="max-w-prose text-[var(--color-muted)]">{ui.description}</p>
|
|
24
|
+
</header>
|
|
25
|
+
|
|
26
|
+
<nav class="motion-rise text-sm" style="animation-delay: 80ms">
|
|
27
|
+
<a href={localePath(locale, '/about/')}>{ui.about}</a>
|
|
28
|
+
</nav>
|
|
29
|
+
</main>
|
|
30
|
+
</BaseLayout>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
import BaseLayout from '@/layouts/BaseLayout.astro';
|
|
3
|
+
import { copy, localePath, localeStaticPaths } from '@/i18n';
|
|
4
|
+
import { tracked } from '../../../site.config.mjs';
|
|
5
|
+
|
|
6
|
+
// Built only while an analytics ID is set (site.config.mjs); the cookie question links here.
|
|
7
|
+
// scripts/deploy.sh refuses to ship until privacyBody in src/i18n is this site's own text.
|
|
8
|
+
export const getStaticPaths = () => (tracked ? localeStaticPaths() : []);
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
locale: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { locale } = Astro.props;
|
|
15
|
+
const ui = copy(locale);
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<BaseLayout locale={locale} title={ui.privacy} description={ui.privacyDescription}>
|
|
19
|
+
<main id="main" class="mx-auto w-full max-w-xl flex-1 px-6 py-16">
|
|
20
|
+
<p class="mb-6 text-sm">
|
|
21
|
+
<a href={localePath(locale)}>{ui.backHome}</a>
|
|
22
|
+
</p>
|
|
23
|
+
<article class="space-y-3">
|
|
24
|
+
<h1 class="text-3xl">{ui.privacy}</h1>
|
|
25
|
+
<p class="text-[var(--color-muted)]">{ui.privacyBody}</p>
|
|
26
|
+
</article>
|
|
27
|
+
</main>
|
|
28
|
+
</BaseLayout>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { APIRoute } from 'astro';
|
|
2
|
+
import { contentSignal } from '../../site.config.mjs';
|
|
3
|
+
|
|
4
|
+
// One * group: a crawler with its own group ignores *, so Content-Signal would not reach it.
|
|
5
|
+
export const GET: APIRoute = ({ site }) =>
|
|
6
|
+
new Response(
|
|
7
|
+
[
|
|
8
|
+
'User-agent: *',
|
|
9
|
+
`Content-Signal: ${contentSignal}`,
|
|
10
|
+
'Allow: /',
|
|
11
|
+
'',
|
|
12
|
+
`Sitemap: ${new URL('/sitemap-index.xml', site).href}`,
|
|
13
|
+
'',
|
|
14
|
+
].join('\n'),
|
|
15
|
+
{ headers: { 'Content-Type': 'text/plain; charset=utf-8' } },
|
|
16
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { APIRoute } from 'astro';
|
|
2
|
+
import { copy, defaultLocale, meta } from '@/i18n';
|
|
3
|
+
import { colors } from '@/lib/theme';
|
|
4
|
+
import { siteName } from '../../site.config.mjs';
|
|
5
|
+
|
|
6
|
+
export const GET: APIRoute = () => {
|
|
7
|
+
const { hreflang, dir } = meta(defaultLocale);
|
|
8
|
+
const manifest = {
|
|
9
|
+
name: siteName,
|
|
10
|
+
short_name: siteName,
|
|
11
|
+
description: copy(defaultLocale).description,
|
|
12
|
+
lang: hreflang,
|
|
13
|
+
dir,
|
|
14
|
+
start_url: '/',
|
|
15
|
+
display: 'standalone',
|
|
16
|
+
background_color: colors('paper')[0],
|
|
17
|
+
theme_color: colors('accent')[0],
|
|
18
|
+
icons: [
|
|
19
|
+
{ src: '/icon-192.png', sizes: '192x192', type: 'image/png', purpose: 'any' },
|
|
20
|
+
{ src: '/icon-512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable' },
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
return new Response(JSON.stringify(manifest, null, 2), {
|
|
24
|
+
headers: { 'Content-Type': 'application/manifest+json' },
|
|
25
|
+
});
|
|
26
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
@import '@fontsource/jetbrains-mono/400.css';
|
|
3
|
+
@import '@fontsource/jetbrains-mono/500.css';
|
|
4
|
+
@import '@fontsource/jetbrains-mono/700.css';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
Brand tokens: rewrite for this site (see design.md).
|
|
8
|
+
Dominant accent: {{ACCENT_NAME}}. Add sibling accents only if they harmonize (design.md G8).
|
|
9
|
+
*/
|
|
10
|
+
/* `dark:` utilities follow the same switch as the tokens below. */
|
|
11
|
+
@custom-variant dark {
|
|
12
|
+
@media (prefers-color-scheme: dark) {
|
|
13
|
+
&:where([data-theme='auto'] *) {
|
|
14
|
+
@slot;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@theme {
|
|
20
|
+
--font-sans: 'JetBrains Mono', ui-monospace, monospace;
|
|
21
|
+
--font-mono: 'JetBrains Mono', ui-monospace, monospace;
|
|
22
|
+
|
|
23
|
+
--color-paper: #f4f1ea;
|
|
24
|
+
--color-surface: #ebe7dd;
|
|
25
|
+
--color-ink: #1a1a18;
|
|
26
|
+
--color-muted: #5c5a52;
|
|
27
|
+
--color-rule: #d4cfc3;
|
|
28
|
+
--color-accent: {{ACCENT}};
|
|
29
|
+
--color-accent-soft: {{ACCENT_SOFT}};
|
|
30
|
+
--color-on-accent: {{ACCENT_ON}};
|
|
31
|
+
--color-scrim: #12110f;
|
|
32
|
+
--color-on-media: #faf9f6;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@layer base {
|
|
36
|
+
html {
|
|
37
|
+
color-scheme: light;
|
|
38
|
+
background: var(--color-paper);
|
|
39
|
+
color: var(--color-ink);
|
|
40
|
+
font-family: var(--font-sans);
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
line-height: 1.55;
|
|
43
|
+
-webkit-font-smoothing: antialiased;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Dark appearance: on when darkMode is true in site.config.mjs (BaseLayout sets data-theme). */
|
|
47
|
+
:root[data-theme='auto'] {
|
|
48
|
+
color-scheme: light dark;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (prefers-color-scheme: dark) {
|
|
52
|
+
:root[data-theme='auto'] {
|
|
53
|
+
--color-paper: #171614;
|
|
54
|
+
--color-surface: #21201d;
|
|
55
|
+
--color-ink: #ecebe6;
|
|
56
|
+
--color-muted: #a3a197;
|
|
57
|
+
--color-rule: #34322d;
|
|
58
|
+
--color-accent: {{ACCENT_DARK}};
|
|
59
|
+
--color-accent-soft: {{ACCENT_DARK_SOFT}};
|
|
60
|
+
--color-on-accent: #12110f;
|
|
61
|
+
--color-scrim: #0b0a09;
|
|
62
|
+
--color-on-media: #faf9f6;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
JetBrains Mono has no Arabic, Hebrew, Devanagari or CJK glyphs. With it first in the stack,
|
|
68
|
+
browsers fill those scripts from a monospace fallback that breaks Arabic joining.
|
|
69
|
+
A language file sets "font": "system" for these.
|
|
70
|
+
*/
|
|
71
|
+
[data-font='system'] {
|
|
72
|
+
--font-sans: system-ui, sans-serif;
|
|
73
|
+
font-family: var(--font-sans);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
body {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
min-height: 100dvh;
|
|
80
|
+
margin: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
::selection {
|
|
84
|
+
background: var(--color-accent-soft);
|
|
85
|
+
color: var(--color-ink);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Ink text passes AA on paper for every accent; the accent lives in the underline. */
|
|
89
|
+
a {
|
|
90
|
+
color: inherit;
|
|
91
|
+
text-decoration-line: underline;
|
|
92
|
+
text-decoration-color: var(--color-accent);
|
|
93
|
+
text-underline-offset: 0.18em;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
a:hover {
|
|
97
|
+
text-decoration-thickness: 2px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Every picker accent is at least 3:1 against paper (orange is the lowest at 3.19). */
|
|
101
|
+
:focus-visible {
|
|
102
|
+
outline: 2px solid var(--color-accent);
|
|
103
|
+
outline-offset: 2px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
h1,
|
|
107
|
+
h2,
|
|
108
|
+
h3 {
|
|
109
|
+
letter-spacing: -0.02em;
|
|
110
|
+
line-height: 1.15;
|
|
111
|
+
font-weight: 700;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@media (prefers-reduced-motion: reduce) {
|
|
115
|
+
*,
|
|
116
|
+
*::before,
|
|
117
|
+
*::after {
|
|
118
|
+
animation-duration: 0.01ms !important;
|
|
119
|
+
animation-iteration-count: 1 !important;
|
|
120
|
+
transition-duration: 0.01ms !important;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@keyframes rise {
|
|
126
|
+
from {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
transform: translateY(0.6rem);
|
|
129
|
+
}
|
|
130
|
+
to {
|
|
131
|
+
opacity: 1;
|
|
132
|
+
transform: translateY(0);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@keyframes rule-draw {
|
|
137
|
+
from {
|
|
138
|
+
transform: scaleX(0);
|
|
139
|
+
}
|
|
140
|
+
to {
|
|
141
|
+
transform: scaleX(1);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.motion-rise {
|
|
146
|
+
animation: rise 0.7s ease-out both;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.motion-rule {
|
|
150
|
+
transform-origin: left;
|
|
151
|
+
animation: rule-draw 0.9s ease-out 0.15s both;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.motion-rule:dir(rtl) {
|
|
155
|
+
transform-origin: right;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@media (prefers-reduced-motion: reduce) {
|
|
159
|
+
.motion-rise,
|
|
160
|
+
.motion-rule {
|
|
161
|
+
animation: none;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://t3.codes/schema/t3.json",
|
|
3
|
+
"iconPath": "public/favicon.svg",
|
|
4
|
+
"scripts": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Install",
|
|
7
|
+
"command": "npm install",
|
|
8
|
+
"icon": "configure",
|
|
9
|
+
"runOnWorktreeCreate": true,
|
|
10
|
+
"async": false
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Dev",
|
|
14
|
+
"command": "npm run dev",
|
|
15
|
+
"icon": "play",
|
|
16
|
+
"previewUrl": "http://{{PROJECT_NAME}}.localhost:{{DEV_PORT}}/",
|
|
17
|
+
"autoOpenPreview": true
|
|
18
|
+
},
|
|
19
|
+
{ "name": "Build", "command": "npm run build", "icon": "build" },
|
|
20
|
+
{ "name": "Preview", "command": "npm run build && npm run preview", "icon": "play" }
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Cloudflare Pages — Direct Upload of dist/. Static only (no Workers SSR adapter).
|
|
2
|
+
# Pages project name (scripts/deploy.sh creates it on first deploy); override with CLOUDFLARE_PAGES_PROJECT.
|
|
3
|
+
name = "{{PROJECT_NAME}}"
|
|
4
|
+
pages_build_output_dir = "dist"
|
|
5
|
+
compatibility_date = "2026-11-01"
|
|
6
|
+
|
|
7
|
+
# One Pages Function, functions/_middleware.js: markdown for requests that prefer it (see public/_routes.json).
|
|
8
|
+
# Keep the marketing surface static: do not add an SSR adapter for forms.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
indent_style = space
|
|
8
|
+
indent_size = 2
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.md]
|
|
12
|
+
trim_trailing_whitespace = false
|
|
13
|
+
|
|
14
|
+
[*.{svg,png,ico,webp}]
|
|
15
|
+
insert_final_newline = false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
22
|