nook: fix the landing title, isolate /blog, grow the sitemap
The landing page spent its strongest on-page signal on the word "Home"; the title now carries the positioning line and the OG title carries the full brand phrase. /blog on a product subdomain served the personal blog in dev (vinxi ignores the vercel.json rewrites that protect production), splitting the brand and crawl equity — subdomain hits now render the shared 404. /agents, /changelog and /faq join the sitemap registry so they are indexed as they land. Tests: bun test (539 pass); vinxi build clean, no new tsc errors. Issues: FRE-8, FRE-15, FRE-9
This commit is contained in:
@@ -9,6 +9,8 @@ import PostSorting from "~/components/blog/PostSorting";
|
||||
import PublishStatusToggle from "~/components/blog/PublishStatusToggle";
|
||||
import { TerminalSplash } from "~/components/TerminalSplash";
|
||||
import { CACHE_CONFIG } from "~/config";
|
||||
import { useSite } from "~/context/SiteContext";
|
||||
import NotFound from "../[...404]";
|
||||
|
||||
const getPosts = query(async () => {
|
||||
"use server";
|
||||
@@ -77,6 +79,7 @@ const getPosts = query(async () => {
|
||||
}, "posts");
|
||||
|
||||
export default function BlogIndex() {
|
||||
const site = useSite();
|
||||
const [searchParams] = useSearchParams();
|
||||
|
||||
const sort = () => searchParams.sort || "newest";
|
||||
@@ -89,6 +92,15 @@ export default function BlogIndex() {
|
||||
|
||||
const data = createAsync(() => getPosts(), { deferStream: true });
|
||||
|
||||
// Host-dispatch guard: /blog is the personal blog on the apex domain only.
|
||||
// Production rewrites already send `<sub>.freno.me/blog` → `/<sub>/blog`,
|
||||
// which has no route — but in dev the vinxi server ignores vercel.json and
|
||||
// would render the personal blog on a product subdomain, splitting the
|
||||
// brand and crawl equity. Render the shared 404 instead.
|
||||
if (site().id !== "main") {
|
||||
return <NotFound />;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<EdgeCacheHeaders maxAge={60} staleSeconds={3600} />
|
||||
|
||||
Reference in New Issue
Block a user