From 6366dd03e540ec92b4ebd1918ddce4a7bbf99c33 Mon Sep 17 00:00:00 2001 From: luisdralves Date: Sat, 4 Jul 2026 21:57:30 +0100 Subject: [PATCH] JSON-LD --- bun.lock | 5 + package.json | 1 + src/app/layout.tsx | 24 +--- src/app/robots.ts | 3 +- src/app/sections/footer/social-links.tsx | 4 +- src/app/sitemap.ts | 3 +- src/components/icons/mail.svg | 4 + src/content/footer.ts | 6 + src/content/person.ts | 138 +++++++++++++++++++++++ src/content/projects.ts | 2 + src/content/site.ts | 9 ++ src/lib/schema.ts | 132 ++++++++++++++++++++++ 12 files changed, 305 insertions(+), 26 deletions(-) create mode 100644 src/components/icons/mail.svg create mode 100644 src/content/person.ts create mode 100644 src/content/site.ts create mode 100644 src/lib/schema.ts diff --git a/bun.lock b/bun.lock index ad720a5..fff34be 100644 --- a/bun.lock +++ b/bun.lock @@ -25,6 +25,7 @@ "@types/react-dom": "^19", "@types/three": "^0.183.0", "babel-plugin-react-compiler": "1.0.0", + "schema-dts": "^2.0.0", "tailwindcss": "^4", "typescript": "^5", }, @@ -723,6 +724,10 @@ "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + "schema-dts": ["schema-dts@2.0.0", "", { "dependencies": { "schema-dts-lib": "^1.0.0" } }, "sha512-t7NoCy3Rn5GHGx6p7s1qIYK/AeIb8ZxJNR9WUNFkwMv2CiiGZBmqqYWc2FlZVm5ZbiHMY4OvBWhj7QtyrFO2Jw=="], + + "schema-dts-lib": ["schema-dts-lib@1.0.0", "", { "peerDependencies": { "typescript": ">=4.9.5" } }, "sha512-9MEO5vpQH9JdBioUupqluzxSYxPLjhmqRUudk15adUl/ypnRsM2/M1kN3AmVJQeG7nZqcL68H8JlGqQQT6vy9A=="], + "semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], "sharp": ["sharp@0.34.5", "", { "dependencies": { "@img/colour": "^1.0.0", "detect-libc": "^2.1.2", "semver": "^7.7.3" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.34.5", "@img/sharp-darwin-x64": "0.34.5", "@img/sharp-libvips-darwin-arm64": "1.2.4", "@img/sharp-libvips-darwin-x64": "1.2.4", "@img/sharp-libvips-linux-arm": "1.2.4", "@img/sharp-libvips-linux-arm64": "1.2.4", "@img/sharp-libvips-linux-ppc64": "1.2.4", "@img/sharp-libvips-linux-riscv64": "1.2.4", "@img/sharp-libvips-linux-s390x": "1.2.4", "@img/sharp-libvips-linux-x64": "1.2.4", "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", "@img/sharp-libvips-linuxmusl-x64": "1.2.4", "@img/sharp-linux-arm": "0.34.5", "@img/sharp-linux-arm64": "0.34.5", "@img/sharp-linux-ppc64": "0.34.5", "@img/sharp-linux-riscv64": "0.34.5", "@img/sharp-linux-s390x": "0.34.5", "@img/sharp-linux-x64": "0.34.5", "@img/sharp-linuxmusl-arm64": "0.34.5", "@img/sharp-linuxmusl-x64": "0.34.5", "@img/sharp-wasm32": "0.34.5", "@img/sharp-win32-arm64": "0.34.5", "@img/sharp-win32-ia32": "0.34.5", "@img/sharp-win32-x64": "0.34.5" } }, "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg=="], diff --git a/package.json b/package.json index fd3729e..19a964c 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@types/react-dom": "^19", "@types/three": "^0.183.0", "babel-plugin-react-compiler": "1.0.0", + "schema-dts": "^2.0.0", "tailwindcss": "^4", "typescript": "^5" }, diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 05855db..cfde00b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -3,6 +3,8 @@ import { Courier_Prime, Outfit, Space_Grotesk } from "next/font/google"; import type { ReactNode } from "react"; import "./globals.css"; import { MotionProvider } from "@/components/motion-provider"; +import { graph } from "@/lib/schema"; +import { SITE_DESCRIPTION, SITE_TITLE, SITE_URL } from "@/content/site"; const spaceGrotesk = Space_Grotesk({ subsets: ["latin"], @@ -23,11 +25,6 @@ const courierPrime = Courier_Prime({ display: "swap", }); -const SITE_URL = "https://luisdralves.dev"; -const SITE_TITLE = "luisdralves"; -const SITE_DESCRIPTION = - "Personal site of Luís Alves. Building systems that connect, things to preserve, new ways to see familiar things. Easier to show than tell."; - export const metadata: Metadata = { metadataBase: new URL(SITE_URL), title: SITE_TITLE, @@ -57,21 +54,6 @@ export const metadata: Metadata = { robots: { index: true, follow: true }, }; -const personSchema = { - "@context": "https://schema.org", - "@type": "Person", - name: "Luís Alves", - alternateName: "luisdralves", - url: SITE_URL, - sameAs: [ - "https://github.com/luisdralves", - "https://gitea.luisdralves.dev/luis", - "https://linkedin.com/in/luisdralves", - ], - jobTitle: "Software Engineer", - description: SITE_DESCRIPTION, -}; - export default function RootLayout({ children, }: Readonly<{ @@ -121,7 +103,7 @@ export default function RootLayout({