The root layout was stamping the homepage title and production root onto every page. Routes now supply a page segment through one em-dash template, canonicals follow the request path, and non-production hosts disallow crawlers. Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
747 B
TypeScript
17 lines
747 B
TypeScript
import type { Metadata } from "next";
|
|
import messages from "../../../messages/en/index";
|
|
import { listRuleTemplatesFromDb } from "../../../lib/server/ruleTemplates";
|
|
import { routeMetadata } from "../../../lib/siteMetadata";
|
|
import { gridEntriesForFullCatalogWithFallback } from "../../../lib/templates/templateGridPresentation";
|
|
import TemplatesPageClient from "./TemplatesPageClient";
|
|
|
|
export const metadata: Metadata = routeMetadata("/templates", {
|
|
title: messages.metadata.templates.title,
|
|
});
|
|
|
|
export default async function TemplatesPage() {
|
|
const rows = await listRuleTemplatesFromDb();
|
|
const initialGridEntries = gridEntriesForFullCatalogWithFallback(rows);
|
|
return <TemplatesPageClient initialGridEntries={initialGridEntries} />;
|
|
}
|