diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..5174768 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-Agent: * +Allow: / +Sitemap: https://dashcaddy.net/sitemap.xml +Host: https://dashcaddy.net diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..7bead98 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,17 @@ + + +https://dashcaddy.net/weekly1.0 +https://dashcaddy.net/features/monthly0.9 +https://dashcaddy.net/pricing/monthly0.8 +https://dashcaddy.net/docs/weekly0.9 +https://dashcaddy.net/docs/installation/monthly0.9 +https://dashcaddy.net/docs/catalog/weekly0.8 +https://dashcaddy.net/about/monthly0.7 +https://dashcaddy.net/blog/weekly0.9 +https://dashcaddy.net/blog/deploy-self-hosted-apps-with-ai/monthly0.8 +https://dashcaddy.net/blog/homelab-beginners-guide/monthly0.8 +https://dashcaddy.net/blog/best-homelab-dashboard/monthly0.8 +https://dashcaddy.net/blog/best-self-hosted-apps-homelab/monthly0.8 +https://dashcaddy.net/blog/homelab-reverse-proxy-guide/monthly0.8 +https://dashcaddy.net/blog/homelab-monitoring-guide/monthly0.8 + diff --git a/src/app/blog/[slug]/page.tsx b/src/app/blog/[slug]/page.tsx index d33f955..492020b 100644 --- a/src/app/blog/[slug]/page.tsx +++ b/src/app/blog/[slug]/page.tsx @@ -65,11 +65,21 @@ export async function generateMetadata({ title: `${post.title} — DashCaddy Blog`, description: post.description, alternates: { canonical: `https://dashcaddy.net/blog/${post.slug}/` }, + keywords: post.tags, + authors: [{ name: post.author }], openGraph: { title: post.title, description: post.description, type: "article", url: `https://dashcaddy.net/blog/${post.slug}/`, + publishedTime: `${post.date}T00:00:00Z`, + authors: [post.author], + tags: post.tags, + }, + twitter: { + card: "summary_large_image", + title: post.title, + description: post.description, }, }; } @@ -85,9 +95,29 @@ export default async function BlogPostPage({ if (!post || body === null) notFound(); const html = marked.parse(body, { async: false }) as string; + const canonical = `https://dashcaddy.net/blog/${post.slug}/`; + const jsonLd = { + "@context": "https://schema.org", + "@type": "BlogPosting", + headline: post.title, + description: post.description, + datePublished: `${post.date}T00:00:00Z`, + dateModified: `${post.date}T00:00:00Z`, + author: { "@type": "Person", name: post.author }, + publisher: { "@type": "Organization", name: "DashCaddy" }, + mainEntityOfPage: { "@type": "WebPage", "@id": canonical }, + url: canonical, + keywords: post.tags.join(", "), + }; return (
+