fix(blog): fix url to blog page
This commit is contained in:
parent
11f447d91d
commit
218af8bcf1
7 changed files with 43 additions and 83 deletions
|
|
@ -48,8 +48,10 @@ export default function Table({ data, headers }: Props): JSX.Element {
|
|||
// and because Astro don't allow me to pass JSX from an Astro file to a TSX file,
|
||||
// so I have to pass the formatted row as a string.
|
||||
// DON'T use this method on a public API
|
||||
if (header.hasCustomCell) {
|
||||
return <div dangerouslySetInnerHTML={{ __html: data.customCell }} />;
|
||||
if (header.hasCustomCell && header.formatter) {
|
||||
return (
|
||||
<div dangerouslySetInnerHTML={{ __html: header.formatter(data) }} />
|
||||
);
|
||||
}
|
||||
|
||||
if (header.type === HeaderType.Multiple) {
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ export enum HeaderType {
|
|||
export interface Header {
|
||||
key: string;
|
||||
header: string;
|
||||
hasCustomCell: boolean;
|
||||
type: HeaderType;
|
||||
hasCustomCell?: boolean;
|
||||
formatter?: (data: any) => string;
|
||||
}
|
||||
|
||||
export interface Filter {
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
---
|
||||
tags:
|
||||
- music
|
||||
title: Pokerus Project
|
||||
draft: true
|
||||
---
|
||||
## Ice Path - Pokemon gold - silver
|
||||
|
||||
Esta canción fue una sorpresa para mi, ya que pokémon HearthGold fue uno de los juegos que más jugue de pokémon y el que más disfruté, escuchar ese tema fue desbloquar un recuerdo perdido que no podía precizar en ese momento
|
||||
|
||||
Fue una experiencia muy extraña y nostalgica, pero muy placentera a la vez.
|
||||
|
||||
## Megalovania - Undertale - Pebre Pixel
|
||||
|
||||
Hey, es megalovania we, la canción del meme
|
||||
|
||||
## Stickerbrush Symphony - DKC 2 - Infection #1
|
||||
|
||||
Esta versión de este tema es muy weno, pasa como por mil emociones a lo largo de la canción, y especificamente la versión que tocaron en este conciertno es muy bacan con la banda completa, no tiene comparación a la versión disponible en spotify
|
||||
|
||||
El hecho que de esa sencación de diferencia entre el arreglo original de pato en 2013 y la versión full banda en 2022 muestra lo mucho que han crecido los carbos <3
|
||||
|
||||
## Underground 1-2 - Super Mario Bros - Infection #4
|
||||
|
||||
Otra sorpresa, no había escuchado la versión de este tema, y fue el medio viaje. Es una versión con tanta identidad, algo tan distinto a lo que otros artistas (que yo he escuchado) han echo, y el toque de los sonidos y visuales es espectacular
|
||||
|
||||
## Dark world - A link to the past - No cache
|
||||
|
||||
Este tema si lo había escuchado antes de ellos, pero solo un par de veces, e insisto, las versiones tocadas en este concierto tienen algo distinto que se sienten mucho mejores
|
||||
|
||||
Es como si estuvieran las originales, las del disco re-infection y las del concierto
|
||||
|
||||
## The elemental stars - Golden Sun - The sun sagas
|
||||
|
||||
Tenemos un caso de "no he jugado el juego, pero puta que es bueno el tema", este tema lo disfruto muchisimo a pesar de tener 0 interes en la saga, lo encuentro tan calmante y a la vez tan potente
|
||||
|
||||
Considero que eso es una de las cosas que más me gusta de esta banda, como puede entregar tantas emociones en una canción.
|
||||
|
||||
## The abandon ship - Pokemon ruby / zaphire - tampoco caché
|
||||
|
||||
Hablando de juegos en los que no tengo interes, pokemon. Si, ya sé que dije que jugue mucho hearthgold, pero en el momento en se me borró la partida perdí todo interes en la saga, y aún así otro tema que estoy vacilando como si lo hubiera escuchado toda la vida
|
||||
8
src/content/blog/devlog-0001.md
Normal file
8
src/content/blog/devlog-0001.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: Devlog 0001
|
||||
draft: false
|
||||
tags:
|
||||
- devlog
|
||||
published_at: 2024-07-28 11:15
|
||||
updated_at: 2024-07-28 11:15
|
||||
---
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import { MediaType } from '@components/MediaGallery/types';
|
||||
import { z, defineCollection } from 'astro:content';
|
||||
import { defineCollection, z } from 'astro:content';
|
||||
|
||||
// AstroJS collection configuration
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
import { changeLanguage } from "i18next";
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
|
||||
changeLanguage("en");
|
||||
---
|
||||
|
||||
<Layout title="Blog">
|
||||
<h1>Blog</h1>
|
||||
</Layout>
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
import { changeLanguage } from "i18next";
|
||||
import { getCollection } from "astro:content";
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import Table from "@components/Table";
|
||||
import { HeaderType, type Header } from "@components/Table/types";
|
||||
import { changeLanguage } from 'i18next';
|
||||
import { getCollection } from 'astro:content';
|
||||
import Layout from '@layouts/Layout.astro';
|
||||
import Table from '@components/Table';
|
||||
import { HeaderType, type Header } from '@components/Table/types';
|
||||
|
||||
changeLanguage("en");
|
||||
changeLanguage('en');
|
||||
|
||||
const rawEntries = await getCollection("blog", ({ data }) => {
|
||||
const rawEntries = await getCollection('blog', ({ data }) => {
|
||||
return import.meta.env.PROD ? data.draft !== true : true;
|
||||
});
|
||||
const entries = rawEntries.map((item, idx) => ({
|
||||
|
|
@ -17,19 +17,20 @@ const entries = rawEntries.map((item, idx) => ({
|
|||
}));
|
||||
const headers: Header[] = [
|
||||
{
|
||||
key: "id",
|
||||
header: "index",
|
||||
key: 'id',
|
||||
header: 'index',
|
||||
type: HeaderType.Index,
|
||||
},
|
||||
{
|
||||
key: "title",
|
||||
header: "Title",
|
||||
key: 'title',
|
||||
header: 'Title',
|
||||
hasCustomCell: true,
|
||||
formatter: (data) => `<a href="blog/${data.slug}">${data.title}</a>`,
|
||||
type: HeaderType.String,
|
||||
},
|
||||
{
|
||||
key: "tags",
|
||||
header: "Tags",
|
||||
key: 'tags',
|
||||
header: 'Tags',
|
||||
type: HeaderType.Multiple,
|
||||
},
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue