create-avalon 0.1.23 → 0.1.24

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.
Files changed (2) hide show
  1. package/dist/cli.js +119 -16
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1156,13 +1156,15 @@ async function collectProjectConfig(initialName) {
1156
1156
  const pluginsResult = await Lt2({
1157
1157
  message: "Which plugins would you like to include? (use space to toggle, enter to confirm)",
1158
1158
  options: [
1159
- { value: "agent-optimization", label: "agent-optimization", hint: "LLM/AI optimization" },
1159
+ { value: "seo", label: "seo", hint: "Auto-injects OG, Twitter cards, JSON-LD, canonical URLs" },
1160
+ { value: "agent-optimization", label: "agent-optimization", hint: "LLM/AI optimization (llms.txt, markdown, sitemap)" },
1160
1161
  {
1161
1162
  value: "syntax-highlighting",
1162
1163
  label: "syntax-highlighting",
1163
1164
  hint: "Code block highlighting for MDX (rehype-highlight)"
1164
1165
  }
1165
1166
  ],
1167
+ initialValues: ["seo"],
1166
1168
  required: false
1167
1169
  });
1168
1170
  if (Ct(pluginsResult)) {
@@ -1335,6 +1337,62 @@ const absoluteTimeout = setTimeout(() => {
1335
1337
  }, 240_000);
1336
1338
  `;
1337
1339
  }
1340
+ function generateRobotsTxt(sitemapUrl = "https://YOUR_DOMAIN/sitemap.xml") {
1341
+ return `# robots.txt
1342
+
1343
+ User-agent: *
1344
+ Allow: /
1345
+
1346
+ # Sitemap
1347
+ Sitemap: ${sitemapUrl}
1348
+
1349
+ # AI Crawlers — explicitly allowed
1350
+ User-agent: GPTBot
1351
+ Allow: /
1352
+
1353
+ User-agent: ChatGPT-User
1354
+ Allow: /
1355
+
1356
+ User-agent: Google-Extended
1357
+ Allow: /
1358
+
1359
+ User-agent: PerplexityBot
1360
+ Allow: /
1361
+
1362
+ User-agent: OAI-SearchBot
1363
+ Allow: /
1364
+
1365
+ User-agent: Applebot-Extended
1366
+ Allow: /
1367
+
1368
+ User-agent: Amazonbot
1369
+ Allow: /
1370
+
1371
+ User-agent: ClaudeBot
1372
+ Allow: /
1373
+
1374
+ User-agent: Bytespider
1375
+ Allow: /
1376
+
1377
+ User-agent: cohere-ai
1378
+ Allow: /
1379
+
1380
+ User-agent: Diffbot
1381
+ Allow: /
1382
+
1383
+ User-agent: anthropic-ai
1384
+ Allow: /
1385
+
1386
+ User-agent: Claude-Web
1387
+ Allow: /
1388
+
1389
+ User-agent: CCBot
1390
+ Allow: /
1391
+
1392
+ User-agent: AI2Bot
1393
+ Allow: /
1394
+ `;
1395
+ }
1338
1396
 
1339
1397
  // src/templates/favicon.ts
1340
1398
  var FAVICON_BASE64 = "AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAACMuAAAjLgAAAAAAAAAAAAAAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8BAAD/AQAA/wEAAP8BAAD/AQAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wIBAP9DIQr/f0AT/4BAE/+AQBP/f0AT/34/E/9+PxL/fj8T/39AE/+BQBP/cjkR/yAQBf8GAwH/Wy4N/4hEFP+HRBT/h0QU/4dEFP+GQxT/hUMU/4VDE/+EQhP/hEIT/2QzD/8PCAL/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/KxYG/8BgHP/YbSD/12wg/9dsIP/XbCD/12wg/9dsIP/XbCD/12wg/9dsIP/YbSD/iEUU/1AoDP/OaB7/2Gwg/9dsIP/XbCD/12wg/9dsIP/XbCD/12wg/9dsIP/XbCD/1Gsf/18wDv8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8+Hwn/z2ge/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9RqH//FYx3/jUcV/9BpH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Vax//r1ga/xgMBP8AAAD/AAAA/wAAAP8AAAD/AAAA/xEIAv+lUxj/1msf/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9VrH/+iURj/tlsb/9VrH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//XzAO/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/1UrDP/RaR//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//1Gof/8RiHf+ZTRb/0Wkf/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9VrH/+tVxn/FgsD/wAAAP8AAAD/AAAA/wAAAP8AAAD/EwoD/6lVGf/Wax//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//1Gsf/6FRGP+6XRv/1Wsf/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9BoH/9BIQr/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/Wi0N/9JqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Uax//wmId/51PF//Sah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Vax//ul4b/yQSBf8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8WCwP/rVcZ/9VrH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Uah//olEY/71fHP/Uax//02of/9NqH//Tah//02of/9NqH//Tah//02of/9FpH/9eLw7/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP9fLw7/02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9RrH//BYRz/oFEX/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Wax//l0wW/w0HAv8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/xgMBP+wWRr/1Wsf/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH/+iUhj/wWEc/9RrH//Tah//02of/9NqH//Tah//1Gsf/8BhHP8xGQf/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/2QyD//Uah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//1Gsf/8BgHP+kUxj/02of/9NqH//Tah//02of/9NqH//Tah//ZzQP/wEAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/HA4E/7RaGv/Vax//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/6NSGP/EYh3/1Gof/9NqH//Tah//1msf/59QF/8RCQP/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/aTUP/9RrH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Uax//v2Ac/6hVGf/Uah//02of/9RrH//FYx3/ORwI/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8fDwT/t1wb/9VrH//Tah//02of/9NqH//Tah//02of/9NqH//Tah//02of/9NqH//Sah//pVMY/8dkHf/Uax//1Gsf/3E5EP8CAQD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AA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A/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
@@ -1351,16 +1409,21 @@ function generateRootLayout(config) {
1351
1409
  } else {
1352
1410
  imports.push(`import '../styles/main.css';`);
1353
1411
  }
1412
+ const safeName = config.projectName.replace(/\\/g, "\\\\").replace(/'/g, "\\'").replace(/`/g, "\\`").replace(/\$\{/g, "\\${");
1354
1413
  return `${imports.join(`
1355
1414
  `)}
1356
1415
 
1357
- export default async function RootLayout({ children }: Readonly<LayoutProps>) {
1416
+ export default async function RootLayout({ children, frontmatter }: Readonly<LayoutProps>) {
1417
+ const title = frontmatter?.title ?? '${safeName}';
1418
+ const description = frontmatter?.description ?? '';
1419
+
1358
1420
  return (
1359
1421
  <html lang="en">
1360
1422
  <head>
1361
1423
  <meta charset="UTF-8" />
1362
1424
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
1363
- <title>${config.projectName}</title>
1425
+ <title>{title}</title>
1426
+ {description && <meta name="description" content={description} />}
1364
1427
  <link rel="icon" href="/favicon.ico" />
1365
1428
  </head>
1366
1429
  <body style={{ margin: 0 }}>
@@ -1371,10 +1434,10 @@ export default async function RootLayout({ children }: Readonly<LayoutProps>) {
1371
1434
  }
1372
1435
  `;
1373
1436
  }
1374
- function generateHomeLayout(config) {
1437
+ function generateMainLayout(config) {
1375
1438
  return `import type { LayoutProps } from '@useavalon/avalon';
1376
1439
 
1377
- export default async function HomeLayout({ children }: Readonly<LayoutProps>) {
1440
+ export default async function MainLayout({ children }: Readonly<LayoutProps>) {
1378
1441
  return <>{children}</>;
1379
1442
  }
1380
1443
  `;
@@ -1401,9 +1464,9 @@ var INTEGRATION_PACKAGES = {
1401
1464
  qwik: "@useavalon/qwik"
1402
1465
  };
1403
1466
  var BASE_DIRS = [
1404
- "app/modules/home/pages",
1405
- "app/modules/home/components",
1406
- "app/modules/home/layouts",
1467
+ "app/modules/main/pages",
1468
+ "app/modules/main/components",
1469
+ "app/modules/main/layouts",
1407
1470
  "app/shared/layouts",
1408
1471
  "app/shared/components",
1409
1472
  "app/shared/styles",
@@ -1421,6 +1484,9 @@ function generatePackageJson(config) {
1421
1484
  for (const integration of config.integrations) {
1422
1485
  dependencies[INTEGRATION_PACKAGES[integration]] = "latest";
1423
1486
  }
1487
+ if (config.plugins.includes("seo")) {
1488
+ dependencies["@useavalon/seo"] = "latest";
1489
+ }
1424
1490
  if (config.plugins.includes("agent-optimization")) {
1425
1491
  dependencies["@useavalon/agent-optimization"] = "latest";
1426
1492
  }
@@ -1470,7 +1536,7 @@ function generatePackageJson(config) {
1470
1536
  }
1471
1537
 
1472
1538
  // src/templates/pages.ts
1473
- function generateHomePage(config) {
1539
+ function generateMainPage(config) {
1474
1540
  return `export const metadata = {
1475
1541
  title: 'Avalon — Islands Architecture',
1476
1542
  description: 'A multi-framework islands architecture project powered by Avalon.',
@@ -1508,7 +1574,7 @@ export default async function HomePage() {
1508
1574
  <div style={{ position: 'relative', zIndex: 1, marginTop: '4rem', display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '0.75rem' }}>
1509
1575
  <p style={{ fontSize: '0.75rem', color: '#64748b', letterSpacing: '0.1em', textTransform: 'uppercase' }}>Get started</p>
1510
1576
  <code style={{ display: 'block', padding: '0.6rem 1.2rem', borderRadius: '6px', background: 'rgba(255,255,255,0.04)', border: '1px solid rgba(255,255,255,0.08)', color: '#a5b4fc', fontSize: '0.85rem', fontFamily: 'ui-monospace, monospace' }}>
1511
- Edit app/modules/home/pages/index.tsx
1577
+ Edit app/modules/main/pages/index.tsx
1512
1578
  </code>
1513
1579
  </div>
1514
1580
 
@@ -1523,6 +1589,24 @@ export default async function HomePage() {
1523
1589
  }
1524
1590
  `;
1525
1591
  }
1592
+ function generate404Page() {
1593
+ return `export const metadata = {
1594
+ title: '404 - Page Not Found',
1595
+ description: 'The page you are looking for does not exist.',
1596
+ robots: 'noindex, nofollow',
1597
+ };
1598
+
1599
+ export default function NotFoundPage() {
1600
+ return (
1601
+ <div style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', fontFamily: 'system-ui, -apple-system, sans-serif', textAlign: 'center', padding: '2rem' }}>
1602
+ <h1 style={{ fontSize: '4rem', margin: '0 0 1rem' }}>404</h1>
1603
+ <p style={{ fontSize: '1.25rem', color: '#64748b', margin: '0 0 2rem' }}>Page not found</p>
1604
+ <a href="/" style={{ color: '#6366f1', textDecoration: 'none', fontWeight: 500 }}>Go Home</a>
1605
+ </div>
1606
+ );
1607
+ }
1608
+ `;
1609
+ }
1526
1610
 
1527
1611
  // src/templates/post-build.ts
1528
1612
  function generatePostBuildMjs() {
@@ -1558,8 +1642,8 @@ function generateStylingFiles(config) {
1558
1642
  case "css-modules":
1559
1643
  files.set("app/shared/styles/tokens.css", generateTokensCss());
1560
1644
  files.set("app/shared/layouts/_layout.module.css", generateLayoutModuleCss());
1561
- files.set("app/modules/home/pages/index.module.css", generatePageModuleCss());
1562
- files.set("app/modules/home/layouts/_layout.module.css", generateLayoutModuleCss());
1645
+ files.set("app/modules/main/pages/index.module.css", generatePageModuleCss());
1646
+ files.set("app/modules/main/layouts/_layout.module.css", generateLayoutModuleCss());
1563
1647
  break;
1564
1648
  case "tailwind":
1565
1649
  files.set("tailwind.config.js", generateTailwindConfig());
@@ -1819,20 +1903,37 @@ function generateViteConfig(config) {
1819
1903
  if (needsTailwind) {
1820
1904
  imports.push(`import tailwindcss from '@tailwindcss/vite';`);
1821
1905
  }
1906
+ const hasSeo = config.plugins.includes("seo");
1907
+ if (hasSeo) {
1908
+ imports.push(`import { seo } from '@useavalon/seo';`);
1909
+ }
1822
1910
  const hasAgentOptimization = config.plugins.includes("agent-optimization");
1823
1911
  if (hasAgentOptimization) {
1824
1912
  imports.push(`import { agentOptimization } from '@useavalon/agent-optimization';`);
1825
1913
  }
1826
1914
  const integrationsList = config.integrations.map((i) => `'${i}'`).join(", ");
1827
1915
  const pluginEntries = [];
1916
+ if (hasSeo) {
1917
+ pluginEntries.push(` seo({
1918
+ siteUrl: 'http://localhost:3000',
1919
+ siteName: '${config.projectName.replace(/'/g, "\\'")}',
1920
+ defaultDescription: 'Built with Avalon',
1921
+ defaultOgImage: {
1922
+ url: '/og-image.png',
1923
+ width: 1200,
1924
+ height: 630,
1925
+ },
1926
+ breadcrumbs: true,
1927
+ speakable: true,
1928
+ }),`);
1929
+ }
1828
1930
  if (hasAgentOptimization) {
1829
1931
  pluginEntries.push(` agentOptimization({
1830
1932
  sitemap: { siteUrl: 'http://localhost:3000' },
1831
1933
  markdown: true,
1832
- structuredData: true,
1833
1934
  llms: {
1834
1935
  siteUrl: 'http://localhost:3000',
1835
- siteName: 'My Avalon App',
1936
+ siteName: '${config.projectName.replace(/'/g, "\\'")}',
1836
1937
  siteDescription: 'Built with Avalon',
1837
1938
  sections: { 'Pages': ['/'] },
1838
1939
  },
@@ -1955,8 +2056,9 @@ async function scaffoldProject(config, targetDir) {
1955
2056
  await writeFile(join(targetDir, "tsconfig.json"), generateTsConfig());
1956
2057
  await writeFile(join(targetDir, "vite.config.ts"), generateViteConfig(config));
1957
2058
  await writeFile(join(targetDir, "app/shared/layouts/_layout.tsx"), generateRootLayout(config));
1958
- await writeFile(join(targetDir, "app/modules/home/layouts/_layout.tsx"), generateHomeLayout(config));
1959
- await writeFile(join(targetDir, "app/modules/home/pages/index.tsx"), generateHomePage(config));
2059
+ await writeFile(join(targetDir, "app/modules/main/layouts/_layout.tsx"), generateMainLayout(config));
2060
+ await writeFile(join(targetDir, "app/modules/main/pages/index.tsx"), generateMainPage(config));
2061
+ await writeFile(join(targetDir, "app/modules/main/pages/404.tsx"), generate404Page());
1960
2062
  await writeFile(join(targetDir, "middleware/01.logger.ts"), generateSampleMiddleware(config));
1961
2063
  await writeFile(join(targetDir, "routes/api/hello.ts"), generateHelloRoute(config));
1962
2064
  if (config.middleware === "hono") {
@@ -1970,6 +2072,7 @@ async function scaffoldProject(config, targetDir) {
1970
2072
  await writeFile(join(targetDir, filePath), content);
1971
2073
  }
1972
2074
  await writeFile(join(targetDir, "public/favicon.ico"), getFaviconBuffer());
2075
+ await writeFile(join(targetDir, "public/robots.txt"), generateRobotsTxt());
1973
2076
  await writeFile(join(targetDir, "server/env.d.ts"), `/// <reference types="nitro" />
1974
2077
  `);
1975
2078
  await writeFile(join(targetDir, "app/env.d.ts"), generateEnvDts(config.integrations));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-avalon",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Scaffold a new Avalon project with multi-framework islands architecture",
5
5
  "license": "MIT",
6
6
  "type": "module",