Skip to content

armgit / bygga

Public Imported from GitHub
0

IKEA assembly, step by step: animated, manual-style 3D guides. Scan any paper manual with Together AI.

TypeScript

Each page names its own canonical; a real 404 title and a favicon

Youssef7f9670c34b5b
diff --git a/src/app/browse/page.tsx b/src/app/browse/page.tsx
index 603e479..aede510 100644
--- a/src/app/browse/page.tsx
+++ b/src/app/browse/page.tsx
@@ -5,7 +5,7 @@ import { Catalog } from "@/components/home/Sections";
import { PRODUCT_COUNT } from "@/lib/search";
import { PRODUCTS } from "@/lib/catalog";
-export const metadata: Metadata = { title: "All guides | Bygga" };
+export const metadata: Metadata = { title: "All guides | Bygga", alternates: { canonical: "/browse" } };
export default function Page() {
return (
diff --git a/src/app/build/[slug]/print/page.tsx b/src/app/build/[slug]/print/page.tsx
index ba99224..35227ac 100644
--- a/src/app/build/[slug]/print/page.tsx
+++ b/src/app/build/[slug]/print/page.tsx
@@ -7,7 +7,8 @@ type Props = { params: Promise<{ slug: string }> };
export async function generateMetadata({ params }: Props): Promise<Metadata> {
const s = catalogSpec(decodeURIComponent((await params).slug));
- return { title: `Print: ${s ? `${s.name} ${s.variant.toLowerCase()}` : "assembly guide"} | Bygga`, robots: { index: false } };
+ const slug = decodeURIComponent((await params).slug);
+ return { title: `Print: ${s ? `${s.name} ${s.variant.toLowerCase()}` : "assembly guide"} | Bygga`, robots: { index: false }, alternates: { canonical: `/build/${slug}` } };
}
export default function Page({ params }: Props) {
diff --git a/src/app/builds/page.tsx b/src/app/builds/page.tsx
index 223f964..90e4946 100644
--- a/src/app/builds/page.tsx
+++ b/src/app/builds/page.tsx
@@ -3,7 +3,8 @@ import SiteHeader from "@/components/SiteHeader";
import Workshop from "@/components/workshop/Workshop";
import SiteFooter from "@/components/SiteFooter";
-export const metadata: Metadata = { title: "Your workshop | Bygga" };
+// your own builds, kept in this browser: nothing for a search engine to index
+export const metadata: Metadata = { title: "Your workshop | Bygga", robots: { index: false } };
export default function Page() {
return (
diff --git a/src/app/favicon.ico b/src/app/favicon.ico
new file mode 100644
index 0000000..9f4bbf2
Binary files /dev/null and b/src/app/favicon.ico differ
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 78dd45a..87e3bfe 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -32,7 +32,6 @@ export const metadata: Metadata = {
appleWebApp: { capable: true, title: "Bygga", statusBarStyle: "default" },
openGraph: { type: "website", siteName: "Bygga", title: "Bygga: step-by-step assembly for IKEA furniture", description, url: "/" },
twitter: { card: "summary_large_image", title: "Bygga: step-by-step assembly for IKEA furniture", description },
- alternates: { canonical: "/" },
};
export const viewport: Viewport = {
diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx
index 233a2b1..a23cc23 100644
--- a/src/app/not-found.tsx
+++ b/src/app/not-found.tsx
@@ -1,9 +1,12 @@
+import type { Metadata } from "next";
import Link from "next/link";
import SiteHeader from "@/components/SiteHeader";
import SiteFooter from "@/components/SiteFooter";
import { Figure } from "@/components/art/Figure";
import { HeroSearch } from "@/components/home/HomeClient";
+export const metadata: Metadata = { title: "Page not found | Bygga", robots: { index: false } };
+
export default function NotFound() {
return (
<div className="site">
diff --git a/src/app/page.tsx b/src/app/page.tsx
index b023dda..a99630d 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,3 +1,4 @@
+import type { Metadata } from "next";
import Link from "next/link";
import SiteHeader from "@/components/SiteHeader";
import SiteFooter from "@/components/SiteFooter";
@@ -14,6 +15,8 @@ import { TogetherMark } from "@/components/art/Together";
import { PRODUCT_COUNT } from "@/lib/search";
import { SCAN_ENABLED } from "@/lib/site";
+export const metadata: Metadata = { alternates: { canonical: "/" } };
+
const QUICK = [
{ slug: "kallax-2x2", label: "KALLAX" },
{ slug: "bissa-shoe-cabinet-2-compartments", label: "BISSA" },