Skip to content

Commit 2b5ee58

Browse files
bholmesdevoz-agent
andcommitted
docs(www): SEO + AEO audit fixes
- Configure site URL (https://simple-stack.dev) and add @astrojs/sitemap so canonical URLs and a sitemap-index.xml are generated at build time. - Add public/robots.txt that allows all crawlers and references the sitemap. - Inject Organization JSON-LD, default Twitter card, og:site_name, and a sensible default robots meta site-wide via Starlight `head`. - Improve home page metadata: better description, OG title/description, and a FAQPage JSON-LD block answering the most common "what is Simple Stack / Simple Store / Simple Scope / Simple Query" questions for AEO. - Mark deprecated docs (Simple Stream and Simple Form) noindex and exclude them from the sitemap so search engines don't surface unmaintained content. Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 70cb101 commit 2b5ee58

9 files changed

Lines changed: 153 additions & 8 deletions

File tree

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/astro.config.mjs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,56 @@
1+
import sitemap from "@astrojs/sitemap";
12
import starlight from "@astrojs/starlight";
23
import { defineConfig } from "astro/config";
34

5+
const SITE_URL = "https://simple-stack.dev";
6+
7+
// Site-wide JSON-LD describing the project as an Organization.
8+
// Helps AI engines (ChatGPT, Perplexity, Google AI Overviews) attribute
9+
// citations and disambiguate the brand.
10+
const organizationJsonLd = {
11+
"@context": "https://schema.org",
12+
"@type": "Organization",
13+
name: "Simple Stack",
14+
url: SITE_URL,
15+
logo: `${SITE_URL}/favicon.svg`,
16+
description:
17+
"Simple Stack is a suite of small, focused tools for Astro and modern web frameworks, including Simple Store, Simple Scope, and Simple Query.",
18+
sameAs: [
19+
"https://github.com/bholmesdev/simple-stack",
20+
"https://wtw.dev/chat",
21+
],
22+
};
23+
424
export default defineConfig({
25+
site: SITE_URL,
26+
trailingSlash: "ignore",
527
integrations: [
628
starlight({
729
title: "Simple Stack 🌱",
30+
description:
31+
"Simple Stack is a suite of small, focused tools for Astro: Simple Store for reactive state, Simple Scope for build-time scoped IDs, and Simple Query for DOM scripting.",
32+
favicon: "/favicon.svg",
33+
head: [
34+
// Canonical Twitter / OG defaults applied to every page.
35+
{
36+
tag: "meta",
37+
attrs: { name: "twitter:card", content: "summary_large_image" },
38+
},
39+
{
40+
tag: "meta",
41+
attrs: { property: "og:site_name", content: "Simple Stack" },
42+
},
43+
{
44+
tag: "meta",
45+
attrs: { name: "robots", content: "index, follow, max-image-preview:large" },
46+
},
47+
// Organization structured data for AEO / rich results.
48+
{
49+
tag: "script",
50+
attrs: { type: "application/ld+json" },
51+
content: JSON.stringify(organizationJsonLd),
52+
},
53+
],
854
social: [
955
{
1056
icon: "github",
@@ -44,5 +90,13 @@ export default defineConfig({
4490
"./src/styles/custom.css",
4591
],
4692
}),
93+
sitemap({
94+
// Keep the sitemap aligned with indexable pages only. The deprecated
95+
// stream and form docs set <meta name="robots" content="noindex">,
96+
// so they should not be advertised to search engines.
97+
filter: (page) =>
98+
!page.startsWith(`${SITE_URL}/stream`) &&
99+
!page.startsWith(`${SITE_URL}/form`),
100+
}),
47101
],
48102
});

www/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@astrojs/check": "^0.9.6",
20+
"@astrojs/sitemap": "^3.6.0",
2021
"@astrojs/starlight": "^0.37.1",
2122
"@fontsource/atkinson-hyperlegible": "^5.0.18",
2223
"astro": "^5.16.6",

www/public/robots.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://simple-stack.dev/robots.txt
2+
# Allow all standard search engine and AI crawlers.
3+
User-agent: *
4+
Allow: /
5+
6+
# Sitemap is generated by @astrojs/sitemap at build time.
7+
Sitemap: https://simple-stack.dev/sitemap-index.xml

www/src/content/docs/form/client.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
---
2-
title: Add client validation
2+
title: Add client validation
33
description: Add client validation to your forms
44
sidebar:
55
order: 3
6+
head:
7+
# Deprecated package: keep the docs accessible but exclude from search engines.
8+
- tag: meta
9+
attrs:
10+
name: robots
11+
content: noindex, follow
612
---
713

814
:::caution

www/src/content/docs/form/index.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
---
22
title: Simple form
3-
description: The simple way to validate forms in your fullstack app.
3+
description: The simple way to validate forms in your fullstack app.
44
sidebar:
55
label: Get started
66
order: 1
7+
head:
8+
# Deprecated package: keep the docs accessible but exclude from search engines.
9+
- tag: meta
10+
attrs:
11+
name: robots
12+
content: noindex, follow
713
---
814

915
import { Tabs, TabItem } from '@astrojs/starlight/components';

www/src/content/docs/form/parse.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
---
2-
title: Parse form requests
2+
title: Parse form requests
33
description: Validate forms server-side
44
sidebar:
55
order: 2
6+
head:
7+
# Deprecated package: keep the docs accessible but exclude from search engines.
8+
- tag: meta
9+
attrs:
10+
name: robots
11+
content: noindex, follow
612
---
713

814
:::caution

www/src/content/docs/index.mdx

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,71 @@
11
---
22
title: Simple stack 🌱
3-
description: A suite of tools built for Astro to simplify your workflow.
3+
description: "Simple Stack is a collection of small, focused tools for Astro: Simple Store for reactive state, Simple Scope for build-time scoped IDs, and Simple Query for DOM scripting."
44
tableOfContents: false
55
head:
6-
- tag: title
7-
content: Simple stack 🌱
6+
- tag: meta
7+
attrs:
8+
property: "og:title"
9+
content: "Simple Stack — small, focused tools for Astro"
10+
- tag: meta
11+
attrs:
12+
property: "og:description"
13+
content: "Simple Store, Simple Scope, and Simple Query: tiny libraries that solve a single use case in Astro and modern web apps."
14+
- tag: script
15+
attrs:
16+
type: "application/ld+json"
17+
content: |
18+
{
19+
"@context": "https://schema.org",
20+
"@type": "FAQPage",
21+
"mainEntity": [
22+
{
23+
"@type": "Question",
24+
"name": "What is Simple Stack?",
25+
"acceptedAnswer": {
26+
"@type": "Answer",
27+
"text": "Simple Stack is a collection of small, focused libraries for Astro and modern web frameworks. It includes Simple Store for reactive state, Simple Scope for build-time scoped IDs, and Simple Query for DOM scripting in Astro components."
28+
}
29+
},
30+
{
31+
"@type": "Question",
32+
"name": "What does Simple Store do?",
33+
"acceptedAnswer": {
34+
"@type": "Answer",
35+
"text": "Simple Store is a reactive store that combines the simplicity of signals with selector-style sub-stores you'd find in Zustand or Redux. It supports React, Next.js, and any framework with a Vite-based toolchain."
36+
}
37+
},
38+
{
39+
"@type": "Question",
40+
"name": "What does Simple Scope do?",
41+
"acceptedAnswer": {
42+
"@type": "Answer",
43+
"text": "Simple Scope is a Vite plugin that generates a stable, scoped ID for the current file at build time, with zero client-side JavaScript. It is useful for form label IDs and querying scoped DOM elements."
44+
}
45+
},
46+
{
47+
"@type": "Question",
48+
"name": "What does Simple Query do?",
49+
"acceptedAnswer": {
50+
"@type": "Answer",
51+
"text": "Simple Query is an Astro integration that adds a small, jQuery-like API for selecting elements inside an Astro component using data-target attributes, with built-in support for the Signals proposal via signal-polyfill."
52+
}
53+
},
54+
{
55+
"@type": "Question",
56+
"name": "Which Simple Stack packages are still maintained?",
57+
"acceptedAnswer": {
58+
"@type": "Answer",
59+
"text": "Simple Store, Simple Scope, and Simple Query are actively maintained. Simple Stream and Simple Form are deprecated; Astro's Server Islands and Form Actions cover those use cases natively."
60+
}
61+
}
62+
]
63+
}
864
---
965

10-
A collection of tools I've built to **make web development simpler.**
66+
**Simple Stack is a collection of small, focused libraries for [Astro](https://astro.build) and modern web frameworks.** Each package solves one job well: [Simple Store](/store) for reactive state, [Simple Scope](/scope) for build-time scoped IDs, and [Simple Query](/query) for DOM scripting in Astro components.
1167

12-
To be honest, there isn't a "story" connecting these packages together (I'm no TanStack). But they follow a common theme: solve a simple use case without too many features.
68+
There isn't a "story" connecting these packages together (I'm no TanStack). But they follow a common theme: solve a simple use case without too many features.
1369

1470
import { CardGrid, Card, LinkCard } from '@astrojs/starlight/components';
1571

www/src/content/docs/stream.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
---
22
title: Simple stream 🌊
33
description: Suspend Astro components with fallback content. Like React Server Components, but Just HTML ™️
4+
head:
5+
# Deprecated package: keep the docs accessible but exclude from search engines.
6+
- tag: meta
7+
attrs:
8+
name: robots
9+
content: noindex, follow
410
---
511

612
:::caution

0 commit comments

Comments
 (0)