Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .changeset/opinionated-mdx-rebuild.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
"@fulldotdev/sitex": minor
---

Rebuild Sitex around MDX-only pages and a framework-owned document head.

Breaking changes:

- Pages are MDX files only. TSX files in `src/pages` fail the build with a migration error; move page markup into layouts and blocks. Dynamic `[param]` routes and the `paths` export are removed.
- The `site` config is required: `sitex({ site: { name, url } })`. Optional fields: `description`, `titleTemplate`, `locale`, `image`, `favicon`, `twitter`, `organization`.
- Frontmatter follows a validated schema: `layout`, `title`, and `description` are required. `type` (`webpage` | `article` | `faq`) drives JSON-LD structured data; `image`, `canonical`, and `index` are optional overrides. Articles require `publishedAt`; FAQ pages require `questions`.
- Apps do not provide `index.html`. Layouts render the full document (`<html>`/`<head>`/`<body>`) and Sitex parses the rendered page to add missing head defaults (charset, viewport, canonical, og:url, robots, favicon, generator) and hoist JSON-LD into the head.
- `src/styles/global.css` is required and automatically imported as the global stylesheet entry. Tailwind is not bundled by Sitex; apps that use Tailwind install `tailwindcss` and `@tailwindcss/vite` themselves.
- `MarkdownLayoutProps` is renamed to `LayoutProps` and now includes the page schema fields. `PageContext`, `StaticPath`, and `StaticPaths` are removed.
- `sitex:pages` has a stable, statically declared `Page` type; generated `.sitex/pages.d.ts` files are no longer written (legacy ones are cleaned up automatically).
- The `src/pages/examples/**` exemption is removed; everything under `src/pages` is a page.
- The main entry no longer exports UI components (`Layout`, `Section`, `Typography`, `Price`, and friends). They moved to the Sitex shadcn registry; install them with `shadcn add` from `https://sitex.full.dev/r/{name}.json`. `@fulldotdev/sitex` now exports types only, plus the `/plugin` and `/island` entries.
- Globals moved to `src/globals/index.yaml` as the root locale file. The root locale name comes from the new `site.locale` option (default `"en"`); additional files like `nl.yaml` define locale variants served under `/nl` route prefixes and are exposed through the `locales` export of `sitex:globals`. A single named file like `en.yaml` still works as the root locale.
- Static HTML is rendered in-process during `vp build` through a dedicated SSR build environment; Sitex no longer boots a second Vite server after the client build.

New:

- Link prefetching is on by default: speculation rules let supporting browsers prerender on hover, with a small hover-prefetch fallback module for others. Opt out with `prefetch: false` or `data-no-prefetch`.
- `vp build` writes `sitemap.xml` (respects `index: false` and `canonical` overrides, `lastmod` from `updatedAt`/`publishedAt`) and a default `robots.txt` when the app ships none.
- Path-alias imports (like `@/components/alert`) now resolve inside MDX pages on newer Vite resolvers.
- Frontmatter validation errors are targeted per field, and MDX pages are typechecked against their layout props via `.sitex/typecheck`.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ coverage/

# Local Netlify folder
.netlify

# generated shadcn registry
apps/docs/public/r/
8 changes: 0 additions & 8 deletions AGENTS.md

This file was deleted.

224 changes: 0 additions & 224 deletions CONTEXT.md

This file was deleted.

10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

SiteX is experimental. Keep changes small, explicit, and aligned with the current scope.
Sitex is experimental. Keep changes small, explicit, and aligned with the current scope.

## Local setup

Expand All @@ -20,7 +20,7 @@ pnpm ready

## Scope

- Keep the public API small: the Vite plugin, TypeScript config, and client directives.
- Prefer static routes and explicit TSX files.
- Do not add SSR, generated routes, content collections, or new client directives without first documenting the decision.
- Preserve the reference app as a simple content-site example.
- Keep the public API small: the Vite plugin, the type exports, the TypeScript config, and the `client:*` directives.
- Pages are static MDX files rendered through app layouts. Document the decision before adding rendering modes, generated routes, or content collections.
- UI components live in `packages/ui` and ship through the shadcn registry, not npm.
- The docs app in `apps/docs` is the reference app; keep it a simple content site.
2 changes: 1 addition & 1 deletion apps/docs/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tsx": true,
"tailwind": {
"config": "",
"css": "src/styles/globals.css",
"css": "src/index.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
Expand Down
43 changes: 22 additions & 21 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,30 @@
},
"dependencies": {
"@base-ui/react": "catalog:",
"@fontsource-variable/geist": "^5.2.9",
"@fontsource-variable/geist": "catalog:",
"@fulldotdev/sitex": "workspace:*",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^1.16.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"@shikijs/core": "^4.1.0",
"@shikijs/engine-javascript": "^4.1.0",
"@shikijs/langs": "^4.1.0",
"@shikijs/themes": "^4.1.0",
"tailwind-merge": "^3.6.0",
"tw-animate-css": "^1.4.0"
"@shikijs/core": "catalog:",
"@shikijs/engine-javascript": "catalog:",
"@shikijs/langs": "catalog:",
"@shikijs/themes": "catalog:",
"class-variance-authority": "catalog:",
"clsx": "catalog:",
"lucide-react": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"schema-dts": "catalog:",
"tailwind-merge": "catalog:",
"tw-animate-css": "catalog:"
},
"devDependencies": {
"@tailwindcss/vite": "^4.1.13",
"@types/react": "^19.1.12",
"@types/react-dom": "^19.1.9",
"@vitejs/plugin-react": "^5.0.2",
"shadcn": "^4.8.3",
"tailwindcss": "^4.1.13",
"typescript": "^5.9.2",
"vite": "^8.0.16",
"vite-plus": "^0.1.24"
"@tailwindcss/vite": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@vitejs/plugin-react": "catalog:",
"shadcn": "catalog:",
"tailwindcss": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vite-plus": "catalog:"
}
}
7 changes: 2 additions & 5 deletions apps/docs/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/docs/src/assets/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading