aboutsummaryrefslogtreecommitdiff
path: root/src/pages/blog
diff options
context:
space:
mode:
authorAriel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>2024-06-18 16:44:54 +0200
committerAriel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>2024-06-18 16:44:54 +0200
commit97c1e8da0c8a73ef5289b930b5c12745912ada7f (patch)
tree8dbbcca21a699496d339fdc9fb6d31bf7c809f01 /src/pages/blog
parentc34cb4134a1374323c3a99c5089f7aefdadda650 (diff)
Deprecate blog and mastodon link
Diffstat (limited to 'src/pages/blog')
-rw-r--r--src/pages/blog/[slug].astro59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/pages/blog/[slug].astro b/src/pages/blog/[slug].astro
deleted file mode 100644
index f9ceec1..0000000
--- a/src/pages/blog/[slug].astro
+++ /dev/null
@@ -1,59 +0,0 @@
----
-import type { GetStaticPaths } from "astro";
-import Layout from "../../layouts/Layout.astro";
-import { getCollection } from "astro:content";
-
-export const getStaticPaths = (async () => {
- const entries = await getCollection("blog");
- return entries.map((entry) => ({
- params: { slug: entry.slug },
- props: { entry },
- }));
-}) satisfies GetStaticPaths;
-
-const { entry } = Astro.props;
-const { Content } = await entry.render();
-
-const formattedDate = new Date(entry.data.publishedAt).toLocaleDateString(
- "es-ES",
- {
- year: "numeric",
- month: "long",
- day: "numeric",
- weekday: "long",
- },
-);
-
-const schema = {
- "@context": "https://schema.org",
- "@type": "BlogPosting",
- headline: entry.data.title,
- datePublished: entry.data.publishedAt.toISOString(),
- author: {
- "@type": "Person",
- name: "Ariel Costas Guerrero",
- },
- publisher: {
- "@type": "Person",
- name: "Ariel Costas Guerrero",
- logo: {
- "@type": "ImageObject",
- url: "https://www.costas.dev/favicon.png",
- },
- },
-};
----
-
-<Layout title={entry.data.title} description={entry.data.metaDescription}>
- <script type="application/ld+json" slot="head-jsonld" set:html={JSON.stringify(schema)}></script>
-
- <h1>{entry.data.title}</h1>
- <small>
- Publicado el
- <time datetime={entry.data.publishedAt.toISOString()}>
- {formattedDate}
- </time>
- </small>
-
- <Content />
-</Layout>