This commit is contained in:
+4
-2
@@ -1,5 +1,7 @@
|
||||
import { type RouteConfig, index } from "@react-router/dev/routes";
|
||||
import { type RouteConfig, index, route } from "@react-router/dev/routes";
|
||||
|
||||
export default [
|
||||
index("routes/home.tsx")
|
||||
index("routes/home.tsx"),
|
||||
route("robots.txt", "routes/robots.ts"),
|
||||
route("sitemap.xml", "routes/sitemap.ts"),
|
||||
] satisfies RouteConfig;
|
||||
|
||||
+16
-5
@@ -2,15 +2,26 @@ import { useEffect, useState } from "react"
|
||||
import { ArrowDown } from "lucide-react"
|
||||
|
||||
import type { Route } from "./+types/home"
|
||||
import { homepageJsonLd, site } from "../seo"
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
return [
|
||||
{ title: "BAGAS AULIA REZKI - Portfolio" },
|
||||
{ title: site.title },
|
||||
{
|
||||
name: "description",
|
||||
content:
|
||||
"Portfolio of Bagas Aulia Rezki, a Fullstack Developer and Information Systems student.",
|
||||
content: site.description,
|
||||
},
|
||||
{ tagName: "link", rel: "canonical", href: site.url },
|
||||
{ name: "robots", content: "index, follow" },
|
||||
{ property: "og:type", content: "website" },
|
||||
{ property: "og:url", content: site.url },
|
||||
{ property: "og:title", content: site.title },
|
||||
{ property: "og:description", content: site.description },
|
||||
{ property: "og:site_name", content: site.name },
|
||||
{ name: "twitter:card", content: "summary_large_image" },
|
||||
{ name: "twitter:title", content: site.title },
|
||||
{ name: "twitter:description", content: site.description },
|
||||
{ "script:ld+json": homepageJsonLd },
|
||||
]
|
||||
}
|
||||
|
||||
@@ -358,9 +369,9 @@ export default function Home() {
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p className="pt-12 text-center font-terminal text-xs text-muted">
|
||||
<h1 className="pt-12 text-center font-terminal text-xs text-muted">
|
||||
developer / student / self-hoster
|
||||
</p>
|
||||
</h1>
|
||||
|
||||
<div className="flex justify-center border-b border-outline p-8 sm:p-12">
|
||||
<div className="w-full max-w-lg border border-outline bg-panel">
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { site } from "../seo"
|
||||
|
||||
export function loader() {
|
||||
const body = [
|
||||
"User-agent: *",
|
||||
"Allow: /",
|
||||
"",
|
||||
`Sitemap: ${site.origin}/sitemap.xml`,
|
||||
"",
|
||||
].join("\n")
|
||||
|
||||
return new Response(body, {
|
||||
headers: {
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { site } from "../seo"
|
||||
|
||||
export function loader() {
|
||||
const body = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>${site.url}</loc>
|
||||
</url>
|
||||
</urlset>
|
||||
`
|
||||
|
||||
return new Response(body, {
|
||||
headers: {
|
||||
"Content-Type": "application/xml; charset=utf-8",
|
||||
},
|
||||
})
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
export const site = {
|
||||
origin: "https://fossy.my.id",
|
||||
url: "https://fossy.my.id/",
|
||||
name: "Bagas Aulia Rezki",
|
||||
title: "Bagas Aulia Rezki | Backend, DevOps & Full-Stack Developer",
|
||||
description:
|
||||
"Portfolio of Bagas Aulia Rezki, a Full-Stack and Backend Developer building Go services, DevOps infrastructure, automation, and self-hosted systems.",
|
||||
} as const
|
||||
|
||||
export const homepageJsonLd = {
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "WebSite",
|
||||
"@id": `${site.origin}/#website`,
|
||||
url: site.url,
|
||||
name: site.name,
|
||||
},
|
||||
{
|
||||
"@type": "ProfilePage",
|
||||
"@id": `${site.origin}/#profile`,
|
||||
url: site.url,
|
||||
mainEntity: {
|
||||
"@id": `${site.origin}/#person`,
|
||||
},
|
||||
},
|
||||
{
|
||||
"@type": "Person",
|
||||
"@id": `${site.origin}/#person`,
|
||||
name: site.name,
|
||||
url: site.url,
|
||||
sameAs: [
|
||||
"https://github.com/fossyy",
|
||||
"https://www.linkedin.com/in/bagas-aulia-rezki/",
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user