Dinamically generate blog indexes
This commit is contained in:
parent
1cb4b098f4
commit
3beeec63be
Binary file not shown.
@ -1,26 +1,31 @@
|
||||
---
|
||||
import BlogLayout from "../../../layouts/BlogLayout.astro";
|
||||
|
||||
const allPosts = await Astro.glob("./*.md");
|
||||
---
|
||||
|
||||
<BlogLayout>
|
||||
<h1>Blog index, WIP</h1>
|
||||
|
||||
<p>Some day there will be a procedurally generated list of pages here!</p>
|
||||
|
||||
<p>Until then:</p>
|
||||
|
||||
<p>Posts:</p>
|
||||
<p>
|
||||
My thoughts on many tech things, on english. This content may (will)
|
||||
differ from what I wrote in Spanish.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a class="underline" href="/blog/en/responsible-stack/">
|
||||
The responsible stack
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="underline" href="/blog/en/go-1/">
|
||||
Golang first impressions
|
||||
</a>
|
||||
</li>
|
||||
{
|
||||
allPosts
|
||||
.toSorted((x, y) =>
|
||||
x.frontmatter.pubDate > y.frontmatter.pubDate ? -1 : 1,
|
||||
)
|
||||
.map((post) => {
|
||||
return (
|
||||
<li>
|
||||
{post.frontmatter.pubDate} -
|
||||
<a class="underline" href={post.url}>
|
||||
{post.frontmatter.title}
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
</BlogLayout>
|
||||
|
@ -10,11 +10,11 @@ image:
|
||||
caption: ThePrimeagen & Theo, as depicted by the author.
|
||||
---
|
||||
|
||||
> TLDR: There's a theoretical "responsible" tech stack that would
|
||||
> ...
|
||||
> TL;DR: There's a theoretical "responsible" tech stack that would
|
||||
> minimize expenses for a company building a product.
|
||||
|
||||
At my first job I worked at a small shop, as "the computer guy". I did
|
||||
everything, from converting word files to `pdf`, to mantain 10 years old
|
||||
everything, from converting word files to `pdf` to mantaining 10 years old
|
||||
legacy PHP webpages, to implementing internal systems.
|
||||
I was the only IT guy, there were around 5-10 call center people and
|
||||
the boss only came like 3 times a week.
|
||||
|
@ -1,24 +1,32 @@
|
||||
---
|
||||
import BlogLayout from "../../../layouts/BlogLayout.astro";
|
||||
|
||||
const allPosts = await Astro.glob("./*.md");
|
||||
---
|
||||
|
||||
<BlogLayout lang="es">
|
||||
<h1>Blog en Español</h1>
|
||||
|
||||
<p>Carita feliz :D</p>
|
||||
|
||||
<p>Posts:</p>
|
||||
<p>
|
||||
Pienso, therefore escribo un blog post en español.
|
||||
<br>
|
||||
Estos post son diferentes a lo que escribo en ingles.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a class="underline" href="/blog/responsible-stack/">
|
||||
The responsible stack
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="underline" href="/blog/go-1/">
|
||||
Golang first impressions
|
||||
</a>
|
||||
</li>
|
||||
{
|
||||
allPosts
|
||||
.toSorted((x, y) =>
|
||||
x.frontmatter.pubDate > y.frontmatter.pubDate ? -1 : 1,
|
||||
)
|
||||
.map((post) => {
|
||||
return (
|
||||
<li>
|
||||
{post.frontmatter.pubDate} -
|
||||
<a class="underline" href={post.url}>
|
||||
{post.frontmatter.title}
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
</BlogLayout>
|
13
src/pages/blog/es/intro.md
Normal file
13
src/pages/blog/es/intro.md
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
layout: ../../../layouts/BlogLayout.astro
|
||||
title: Primera pagina
|
||||
description: Hola mundo :D
|
||||
pubDate: "2024-07-15"
|
||||
tags: ["programming"]
|
||||
image:
|
||||
url: ""
|
||||
alt: ""
|
||||
caption: ""
|
||||
---
|
||||
|
||||
(carita feliz)
|
Loading…
Reference in New Issue
Block a user