aboutsummaryrefslogtreecommitdiff
path: root/src/layouts/HomePageLayout.astro
blob: ca009a511d9fedee0a49fac40dc0909ee886670c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
import { getCollection } from "astro:content";
import Layout from "./Layout.astro";

const blogCollection = (await getCollection("blog")).sort((a, b) => {
  return b.data.publishedAt.getTime() - a.data.publishedAt.getTime();
});

const schema = {
  "@context": "http://schema.org",
  "@type": "WebSite",
  id: "https://www.costas.dev/",
  url: "https://www.costas.dev/",
  headline: "Ariel Costas - Desarrollador web",
};
---

<Layout title="Inicio" description="Página de inicio de mi web">
  <script
    is:inline
    type="application/ld+json"
    slot="head-jsonld"
    set:html={JSON.stringify(schema)}
  />

  <h1>Inicio</h1>

  <p>
    Te doy la bienvenida a mi web. Me llamo Ariel, y aquí encontrarás
    información sobre mí y mis proyectos.
  </p>

  <p>
    En mi blog comparto mis reflexiones, aprendizajes y experiencias sobre los
    temas que me interesan, además de hablar ocasionalmente sobre tecnología y
    desarrollo. Disfruto escribiendo sobre lo que aprendo y reflexiono, pudiendo
    plasmar mis ideas de forma clara y ordenada, y compartiéndolas con el mundo.
  </p>
  <ul>
    {
      blogCollection.slice(0, 5).map((p) => {
        const date = Intl.DateTimeFormat(Astro.currentLocale, {
          day: "2-digit",
          month: "short",
          year: "numeric",
        }).format(p.data.publishedAt);
        return (
          <li>
            <time datetime={p.data.publishedAt.toISOString()}>{date}</time>
            <a href={`/blog/${p.id}/`}>{p.data.title}</a>
          </li>
        );
      })
    }
  </ul>
  <a href="/blog">Ver todas las entradas</a>
</Layout>