Skip to content

Commit 07d45ce

Browse files
authored
Merge pull request #7 from fulldotdev/preview
SiteX 0.4: MDX-only pages, framework-owned head, shadcn UI registry
2 parents 3017e87 + ded12d4 commit 07d45ce

117 files changed

Lines changed: 7498 additions & 6514 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
"@fulldotdev/sitex": minor
3+
---
4+
5+
Rebuild Sitex around MDX-only pages and a framework-owned document head.
6+
7+
Breaking changes:
8+
9+
- 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.
10+
- The `site` config is required: `sitex({ site: { name, url } })`. Optional fields: `description`, `titleTemplate`, `locale`, `image`, `favicon`, `twitter`, `organization`.
11+
- 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`.
12+
- 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.
13+
- `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.
14+
- `MarkdownLayoutProps` is renamed to `LayoutProps` and now includes the page schema fields. `PageContext`, `StaticPath`, and `StaticPaths` are removed.
15+
- `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).
16+
- The `src/pages/examples/**` exemption is removed; everything under `src/pages` is a page.
17+
- 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.
18+
- 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.
19+
- 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.
20+
21+
New:
22+
23+
- 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`.
24+
- `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.
25+
- Path-alias imports (like `@/components/alert`) now resolve inside MDX pages on newer Vite resolvers.
26+
- Frontmatter validation errors are targeted per field, and MDX pages are typechecked against their layout props via `.sitex/typecheck`.

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ coverage/
3232

3333
# Local Netlify folder
3434
.netlify
35+
36+
# generated shadcn registry
37+
apps/docs/public/r/

‎AGENTS.md‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎CONTEXT.md‎

Lines changed: 0 additions & 224 deletions
This file was deleted.

‎CONTRIBUTING.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

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

55
## Local setup
66

@@ -20,7 +20,7 @@ pnpm ready
2020

2121
## Scope
2222

23-
- Keep the public API small: the Vite plugin, TypeScript config, and client directives.
24-
- Prefer static routes and explicit TSX files.
25-
- Do not add SSR, generated routes, content collections, or new client directives without first documenting the decision.
26-
- Preserve the reference app as a simple content-site example.
23+
- Keep the public API small: the Vite plugin, the type exports, the TypeScript config, and the `client:*` directives.
24+
- Pages are static MDX files rendered through app layouts. Document the decision before adding rendering modes, generated routes, or content collections.
25+
- UI components live in `packages/ui` and ship through the shadcn registry, not npm.
26+
- The docs app in `apps/docs` is the reference app; keep it a simple content site.

‎apps/docs/components.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"tsx": true,
66
"tailwind": {
77
"config": "",
8-
"css": "src/styles/globals.css",
8+
"css": "src/index.css",
99
"baseColor": "neutral",
1010
"cssVariables": true,
1111
"prefix": ""

‎apps/docs/package.json‎

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,30 @@
1010
},
1111
"dependencies": {
1212
"@base-ui/react": "catalog:",
13-
"@fontsource-variable/geist": "^5.2.9",
13+
"@fontsource-variable/geist": "catalog:",
1414
"@fulldotdev/sitex": "workspace:*",
15-
"class-variance-authority": "^0.7.1",
16-
"clsx": "^2.1.1",
17-
"lucide-react": "^1.16.0",
18-
"react": "^19.1.1",
19-
"react-dom": "^19.1.1",
20-
"@shikijs/core": "^4.1.0",
21-
"@shikijs/engine-javascript": "^4.1.0",
22-
"@shikijs/langs": "^4.1.0",
23-
"@shikijs/themes": "^4.1.0",
24-
"tailwind-merge": "^3.6.0",
25-
"tw-animate-css": "^1.4.0"
15+
"@shikijs/core": "catalog:",
16+
"@shikijs/engine-javascript": "catalog:",
17+
"@shikijs/langs": "catalog:",
18+
"@shikijs/themes": "catalog:",
19+
"class-variance-authority": "catalog:",
20+
"clsx": "catalog:",
21+
"lucide-react": "catalog:",
22+
"react": "catalog:",
23+
"react-dom": "catalog:",
24+
"schema-dts": "catalog:",
25+
"tailwind-merge": "catalog:",
26+
"tw-animate-css": "catalog:"
2627
},
2728
"devDependencies": {
28-
"@tailwindcss/vite": "^4.1.13",
29-
"@types/react": "^19.1.12",
30-
"@types/react-dom": "^19.1.9",
31-
"@vitejs/plugin-react": "^5.0.2",
32-
"shadcn": "^4.8.3",
33-
"tailwindcss": "^4.1.13",
34-
"typescript": "^5.9.2",
35-
"vite": "^8.0.16",
36-
"vite-plus": "^0.1.24"
29+
"@tailwindcss/vite": "catalog:",
30+
"@types/react": "catalog:",
31+
"@types/react-dom": "catalog:",
32+
"@vitejs/plugin-react": "catalog:",
33+
"shadcn": "catalog:",
34+
"tailwindcss": "catalog:",
35+
"typescript": "catalog:",
36+
"vite": "catalog:",
37+
"vite-plus": "catalog:"
3738
}
3839
}

‎apps/docs/public/favicon.svg‎

Lines changed: 2 additions & 5 deletions
Loading

‎apps/docs/src/assets/.gitkeep‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)