From 47d593e09d4054043a472ffb3303822e4aa9d166 Mon Sep 17 00:00:00 2001 From: "aitor c. urrutia aranburu" Date: Fri, 20 Nov 2026 14:00:00 +0100 Subject: [PATCH] feat: slug-a automatikoki ezartzen du --- .../posts/an-empty-bliss-beyond-this-world.md | 1 - content/posts/anemoia.md | 1 - content/posts/athanasius-kircher.md | 1 - content/posts/beatles-diskografia.md | 3 +- .../posts/cisco-ccna-1-praktika-apunteak.md | 7 ++-- content/posts/dyndns-kaxeroa.md | 1 - .../posts/gilbert-simondon-teknizitatea.md | 1 - .../posts/hay-algo-de-negocio-en-tu-codigo.md | 1 - content/posts/hello-world.md | 1 - content/posts/lorategi-digitalak.md | 5 +-- content/posts/mamihlapinatapai.md | 1 - content/posts/musika-bilduma-streameatu.md | 5 +-- content/posts/oscilloscope-music.md | 2 - .../posts/{panderoa.md => panderoa-jotzen.md} | 1 - content/posts/pi-hole-pivpn.md | 2 +- ...piedras-rai-moneda-de-cambio-inmaterial.md | 1 - content/posts/raspberry-pi-emulazioa.md | 3 +- content/posts/sayagata-bueltan-da.md | 3 +- .../sobre-developers-y-buenas-personas.md | 1 - content/posts/sonder.md | 1 - ...agmatico-de-nuestros-tests-del-frontend.md | 1 - content/posts/zerbitzarian-lekua-egiten.md | 1 - src/components/PostGrid.astro | 9 ++--- src/content.config.ts | 1 - src/pages/post/[slug].astro | 2 +- src/pages/rss.xml.js | 40 +++++++++---------- 26 files changed, 36 insertions(+), 60 deletions(-) rename content/posts/{panderoa.md => panderoa-jotzen.md} (99%) diff --git a/content/posts/an-empty-bliss-beyond-this-world.md b/content/posts/an-empty-bliss-beyond-this-world.md index 580a6d3..f483059 100644 --- a/content/posts/an-empty-bliss-beyond-this-world.md +++ b/content/posts/an-empty-bliss-beyond-this-world.md @@ -1,6 +1,5 @@ --- title: An Empty Bliss Beyond This World - The Caretaker -slug: an-empty-bliss-beyond-this-world description: >- The Caretaker ekoizlearen "An Empty Bliss Beyond This World" diskaren komentario bat. tags: diff --git a/content/posts/anemoia.md b/content/posts/anemoia.md index 0841ac9..c6d9ec9 100644 --- a/content/posts/anemoia.md +++ b/content/posts/anemoia.md @@ -1,6 +1,5 @@ --- title: Anemoia -slug: anemoia description: >- Anemoia kontzeptuari buruzko hausnarketa bat. tags: diff --git a/content/posts/athanasius-kircher.md b/content/posts/athanasius-kircher.md index 2b2f278..73fd03e 100644 --- a/content/posts/athanasius-kircher.md +++ b/content/posts/athanasius-kircher.md @@ -1,6 +1,5 @@ --- title: Athanasius Kircher, el (no tan) conocido polímata -slug: athanasius-kircher description: >- Athanasius Kircher-i buruzko apunte batzuk. 2015ean nuen blog-ean idatzitako post bat. tags: diff --git a/content/posts/beatles-diskografia.md b/content/posts/beatles-diskografia.md index e010d26..727bd65 100644 --- a/content/posts/beatles-diskografia.md +++ b/content/posts/beatles-diskografia.md @@ -1,6 +1,5 @@ --- title: The Beatles taldearen diskografia bisitatzen -slug: beatles-diskografia description: >- Errepaso bat The Beatles taldearen diskografiari. tags: @@ -16,7 +15,7 @@ Ez dakit zer duen The Beatles taldeak. Tira, jakin badakit, talde ikonikoa izan Ez nekien oso ongi nondik hasi bidai hau. Interneten arakatuta, Reddit-en pertsona batek zalantza bera planteatzen zuela ikusi nuen eta [erantzun honekin geratu naiz](https://www.reddit.com/r/beatles/comments/1i9twf/comment/cb2xzev/): -> Listen to them chronologically, excluding Yellow Submarine, switching Abbey Road and Let It Be, and swapping out Let It Be for the superior Naked version. After that, listen through Past Master for their non-album singles and finally finish it all of with a listen to Love. +> Listen to them chronologically, excluding Yellow Submarine, switching Abbey Road and Let It Be, and swapping out Let It Be for the superior Naked version. After that, listen through Past Master for their non-album singles and finally finish it all of with a listen to Love. Bereziki interesgarria iruditzen zait taldearen eboluzioa ikustea. Gauzak horrela eta interneteko pertsona ezezagun horren jakituriari jarraituz, hau da jarraitutako ordena: diff --git a/content/posts/cisco-ccna-1-praktika-apunteak.md b/content/posts/cisco-ccna-1-praktika-apunteak.md index 2fdb9ed..51b9f33 100644 --- a/content/posts/cisco-ccna-1-praktika-apunteak.md +++ b/content/posts/cisco-ccna-1-praktika-apunteak.md @@ -1,6 +1,5 @@ --- title: "Cisco CCNA-1: Praktikarako apunteak" -slug: cisco-ccna-1-praktika-apunteak description: >- Cisco CCNA-1 egin ondoren, praktikarako apunte nagusiak jasotzen ditut. tags: @@ -79,7 +78,9 @@ copy running-config startup-config # Router-aren konfigurazioa ## Interfazeen konfigurazioa + Interfaze bakoitzarekin: + - Deskribapena sortu. - IP helbide eta maskara konfiguratu. - Interfazea piztu. @@ -89,7 +90,7 @@ Interfaze bakoitzarekin: interface g0/0/0 description Connect to Subnet B ip address -no shutdown +no shutdown exit ``` @@ -106,7 +107,7 @@ exit interface vlan 1 description Switch Subnet A ip address -no shutdown +no shutdown exit ip default-gateway diff --git a/content/posts/dyndns-kaxeroa.md b/content/posts/dyndns-kaxeroa.md index 285509c..82b3a55 100644 --- a/content/posts/dyndns-kaxeroa.md +++ b/content/posts/dyndns-kaxeroa.md @@ -1,6 +1,5 @@ --- title: Proiektutxoak zure etxean ostatzeko bi modu -slug: dyndns-kaxeroa description: >- Nola lortu, IP finkorik ez duzunean, domeinu batek zure etxeko zerbitzaritxo batera apuntatzea? tags: diff --git a/content/posts/gilbert-simondon-teknizitatea.md b/content/posts/gilbert-simondon-teknizitatea.md index 44d1be6..1e7ffe1 100644 --- a/content/posts/gilbert-simondon-teknizitatea.md +++ b/content/posts/gilbert-simondon-teknizitatea.md @@ -1,6 +1,5 @@ --- title: Gilbert Simondon eta teknizitatea -slug: gilbert-simondon-teknizitatea description: >- Gilbert Simondon filosofoak sortutako teknizitate kontzeptuari buruzko apunte batzuk. tags: diff --git a/content/posts/hay-algo-de-negocio-en-tu-codigo.md b/content/posts/hay-algo-de-negocio-en-tu-codigo.md index 9e18bde..c81c129 100644 --- a/content/posts/hay-algo-de-negocio-en-tu-codigo.md +++ b/content/posts/hay-algo-de-negocio-en-tu-codigo.md @@ -1,6 +1,5 @@ --- title: "Hay algo de negocio en tu código: (algunas) ideas para la entrega de valor" -slug: hay-algo-de-negocio-en-tu-codigo description: >- Biko2 enpresako blogean idatzitako artikulu bat. tags: diff --git a/content/posts/hello-world.md b/content/posts/hello-world.md index add27aa..95106e7 100644 --- a/content/posts/hello-world.md +++ b/content/posts/hello-world.md @@ -1,6 +1,5 @@ --- title: Kaixo, Mundua! -slug: hello-world description: >- Horrela hasten dira proiektu guztiak frikion unibertsoan. tags: diff --git a/content/posts/lorategi-digitalak.md b/content/posts/lorategi-digitalak.md index 1ce6883..4a3930d 100644 --- a/content/posts/lorategi-digitalak.md +++ b/content/posts/lorategi-digitalak.md @@ -1,6 +1,5 @@ --- title: Lorategi digitalak -slug: lorategi-digitalak description: >- Nire lorategi digitalei buruzko ikuspegia. tags: @@ -10,13 +9,13 @@ added: "2026-1-24" Lorategi digital guztiek daukate lorategi digitalei buruzko sarrera bat. Lorategiaren analogiari jarraituz, esan daiteke sarrera hau belarra dela. Edo lurra, batzuetan emankorra, bestetan antzua, baina ezinbestekoa. Nik neuk mugimendu honi buruzko apunte batzuk jarri nahiko nituzke, inspiragarria suertatzen zaidalako eta honen parte izan nahi dudalako. -Lorategi digitalen testuinguru bat emateko, oso interesgarria da [Maggie Appletonek idatzitako artikulu hau](https://maggieappleton.com/garden-history). Funtsean, lorategi digital bat gure mobidak interneten jartzeko modu bat da. Blog baten antza du, baina hauekin duen ezberdintasun nagusia kaosa eta fintze faltan dago. Ideia da apunteak botatzen joatea (ereitea) eta, nahi dugun heinean, hauetara bueltatzea eta lantzen joatea. Algoritmoen eta biralizazioaren garaiari erantzun bat bezala ulertu daiteke. +Lorategi digitalen testuinguru bat emateko, oso interesgarria da [Maggie Appletonek idatzitako artikulu hau](https://maggieappleton.com/garden-history). Funtsean, lorategi digital bat gure mobidak interneten jartzeko modu bat da. Blog baten antza du, baina hauekin duen ezberdintasun nagusia kaosa eta fintze faltan dago. Ideia da apunteak botatzen joatea (ereitea) eta, nahi dugun heinean, hauetara bueltatzea eta lantzen joatea. Algoritmoen eta biralizazioaren garaiari erantzun bat bezala ulertu daiteke. ## Bidean aurkitutako hainbat lorategi digital Hauek dira niretzat inspiragarri diren lorategi digital batzuk: - [Maggie Appleton](https://maggieappleton.com) -- [Heydon Pickering](https://heydonworks.com/) +- [Heydon Pickering](https://heydonworks.com/) - [Cassidy Williams](https://cassidoo.co/) - [Karlos G. Liberal (patxangas)](https://www.karlosgliberal.com/) diff --git a/content/posts/mamihlapinatapai.md b/content/posts/mamihlapinatapai.md index de8903b..ce94b17 100644 --- a/content/posts/mamihlapinatapai.md +++ b/content/posts/mamihlapinatapai.md @@ -1,6 +1,5 @@ --- title: Mamihlapinatapai -slug: mamihlapinatapai description: >- Yagan hizkuntzako hitz honek hainbat sekretu gordetzen ditu. tags: diff --git a/content/posts/musika-bilduma-streameatu.md b/content/posts/musika-bilduma-streameatu.md index 7371f43..147181a 100644 --- a/content/posts/musika-bilduma-streameatu.md +++ b/content/posts/musika-bilduma-streameatu.md @@ -1,6 +1,5 @@ --- title: Gure musika bilduma gure sarean streameatzeko proposamen bat -slug: musika-bilduma-streameatu description: >- Sareetan azaltzen den #despotify mugimendua jarraitzeko modu bat, Navidrome eta Metadata Remote erabilita. tags: @@ -10,7 +9,7 @@ added: "2026-1-8" Etxean, denbora daramagu musika [Qobuz](https://www.qobuz.com/es-es/discover) plataformaren bidez entzuten. Kalitate ona eskaintzen du, artistak ongi tratatzen dituela dirudi, ez du adimen artifizial generatiboak sortutako musikarik sartzen eta, batez ere, [jabeek ez dute genozidioan inbertitzen](https://www.berria.eus/kultura/euskal-herriko-162-musika-taldek-utzi-dute-spotify-musikariak-palestinarekin-egitasmoarekin-bat-eginda_2150132_102.html). Edonola ere, [#despotify](https://redesnuestras.net/2024/12/31/una-propuesta-para-convertir-en-proposito-de-ano-nuevo-despotify/) ideiarekin kutsatuta, aurrekoan etxean alternatiba propio bat montatzeko aukerak aztertzen egon nintzen. Ikasteko asmoz edo, Qobuz [kakazten denean](https://teknopata.eus/2024/02/kakaztea-enshittification-1-zer-da), prest egoteko. -Hau egiteko, Raspberry Pi gailu bat erabili dut eta, zerbitzari aldean erabilitako software guztiak, Docker edukiontzietan sartu ditut. Hurrengo lerroetan nik frogatutako *stack*-ean sakonduko dut, baina, laburbilduz, hauek dira erabilitako aplikazioak (guztiak *Open Source* proiektuak dira): +Hau egiteko, Raspberry Pi gailu bat erabili dut eta, zerbitzari aldean erabilitako software guztiak, Docker edukiontzietan sartu ditut. Hurrengo lerroetan nik frogatutako _stack_-ean sakonduko dut, baina, laburbilduz, hauek dira erabilitako aplikazioak (guztiak _Open Source_ proiektuak dira): - [Navidrone](https://www.navidrome.org/): Raspberry Pi-an dagoen musika streaming bidez zerbitzatzeko. - [Metadata Remote](https://github.com/wow-signal-dev/metadata-remote): Musika bilduma ordenatzeko eta disken karatulak sartzeko. @@ -38,7 +37,7 @@ Beste sarrera batean azaltzen nuen bezala, [nire Raspberry Pi zerbitzarian VPN b ### Mugikorrerako aplikazioa -Posible da mugikorreko web nabigatzailetik, Navidrome zerbitzarira jotzen dugunean, gure musika mugikorretik entzutea. Hala ere, erosoagoa da beti musika entzuteko aplikazio natibo bat erabiltzea, kontrolak eskura izateko, edota mugikorra blokeatzerakoan entzuten jarraitzeko. +Posible da mugikorreko web nabigatzailetik, Navidrome zerbitzarira jotzen dugunean, gure musika mugikorretik entzutea. Hala ere, erosoagoa da beti musika entzuteko aplikazio natibo bat erabiltzea, kontrolak eskura izateko, edota mugikorra blokeatzerakoan entzuten jarraitzeko. Navidromek, bere webgunean, [bezero zerrenda bat eskaintzen du](https://www.navidrome.org/apps/). Hauetatik, Android mugikorrentzako ospetsuena [Symfonium](https://symfonium.app/) da. Onartu beharra dago, nire ustez behintzat, Symfonium dela aplikazio garbiena eta aukera gehien ematen duena, baina, bere "arazo" nagusia, ordaintzera behartzen duela da. Oker ez banago, 5-6 € ordaintzearekin bizitza osorako lizentzia eskuratu dezakegu, beraz, ez da oso garestia. Nire musika entzuteko modu bakarra sarrera honetan azaldutakoa balitz, dudarik gabe ordainduko nuke. diff --git a/content/posts/oscilloscope-music.md b/content/posts/oscilloscope-music.md index 7f81614..8aebd90 100644 --- a/content/posts/oscilloscope-music.md +++ b/content/posts/oscilloscope-music.md @@ -1,6 +1,5 @@ --- title: Oscilloscope Music -slug: oscilloscope-music description: >- Oscilloscope Music musika generoa aurkitu nuenekoa. tags: @@ -15,7 +14,6 @@ Asteazken arratsalde lasai bat zen. Hurrengo egunerako bazkaria prestatu ondoren
Post by @kbob@chaos.social
View on Mastodon
- Nire burua untxi-gordeleku batean ikusi nuen. Izan ere, ["Oscilloscope Music"](https://oscilloscopemusic.com/watch/n-spheres) genero audiobisuala topatu nuen. Ideia xinplea da: osziloskopioan irudi interesgarriak sortuko duen musika konposatzea. Aurrerago jarritako webgunean, horrela definitzen da: > Oscilloscope Music is audiovisual music, where the visuals are drawn by the sound. In order to get the closest possible correlation between image and sound, the exact same signal that is connected to the left and right speakers is also connected to an analog oscilloscope's X and Y inputs, producing complex lissajous images. diff --git a/content/posts/panderoa.md b/content/posts/panderoa-jotzen.md similarity index 99% rename from content/posts/panderoa.md rename to content/posts/panderoa-jotzen.md index 48e3710..0cceca1 100644 --- a/content/posts/panderoa.md +++ b/content/posts/panderoa-jotzen.md @@ -1,6 +1,5 @@ --- title: Panderoa jotzen -slug: panderoa-jotzen description: >- Panderoaren rabbit hole-ean sartu ondorengo hainbat apunte. tags: diff --git a/content/posts/pi-hole-pivpn.md b/content/posts/pi-hole-pivpn.md index 1109760..3c4051f 100644 --- a/content/posts/pi-hole-pivpn.md +++ b/content/posts/pi-hole-pivpn.md @@ -1,6 +1,5 @@ --- title: "Pi-Hole eta PiVPN: nabigazio segurua edonon" -slug: pi-hole-pivpn description: >- Nola erabili Raspberry Pi bat nabigazioa babesteko etxean eta mugikorrean. tags: @@ -39,6 +38,7 @@ Zerrenda hauekin, milaka DNS blokeatu ditut eta ez dut inoiz sentitu nire nabiga ## PiVPN PiVPN instalatzeko, hoberena da [iturrira joatea](https://www.pivpn.io/). Erabiltzeko, hurrengoa beharko duzu: + - Raspberry Pi gailu bat. - Zuk kudeatzen duzun domeinu izen bat. - WAN aldeko IP fijoa, edo dyndns moduko bat. Nik, script bat sortu nuen hau lortzeko, baina hurrengo post batean azalduko dut. _Edit: [hau da agindutako post hori :)](https://txarli.dev/post/dyndns-kaxeroa/)._ diff --git a/content/posts/piedras-rai-moneda-de-cambio-inmaterial.md b/content/posts/piedras-rai-moneda-de-cambio-inmaterial.md index f90370f..e3e9926 100644 --- a/content/posts/piedras-rai-moneda-de-cambio-inmaterial.md +++ b/content/posts/piedras-rai-moneda-de-cambio-inmaterial.md @@ -1,6 +1,5 @@ --- title: Piedras Rai, moneda de cambio inmaterial -slug: piedras-rai-moneda-de-cambio-inmaterial description: >- Mikronesiako Rai harriei buruzko apunte batzuk. 2015ean nuen blog-ean idatzitako post bat. tags: diff --git a/content/posts/raspberry-pi-emulazioa.md b/content/posts/raspberry-pi-emulazioa.md index 6884fae..ea6990c 100644 --- a/content/posts/raspberry-pi-emulazioa.md +++ b/content/posts/raspberry-pi-emulazioa.md @@ -1,6 +1,5 @@ --- title: Bideojokoak Raspberry Pi batean -slug: raspberry-pi-emulazioa description: >- Nola erabili Raspberry Pi gailu bat bideojokoak emulatzeko. tags: @@ -28,4 +27,4 @@ Bikotea eta biok pote bat hartzen ari ginela, bigarren eskuko denda baten lehioa ## ROM-ak eskuratzeko -- [/r/roms Megathread](https://r-roms.github.io/) \ No newline at end of file +- [/r/roms Megathread](https://r-roms.github.io/) diff --git a/content/posts/sayagata-bueltan-da.md b/content/posts/sayagata-bueltan-da.md index dd613e8..09f65c6 100644 --- a/content/posts/sayagata-bueltan-da.md +++ b/content/posts/sayagata-bueltan-da.md @@ -1,6 +1,5 @@ --- title: Bueltan da sayagata proiektua -slug: sayagata-bueltan-da description: >- Sayagata proiektua berriro ere martxan jarri dut. tags: @@ -12,7 +11,7 @@ Oker ez banago, 2018ko [Pamplona Software Crafters](https://pamplonaswcraft.com/ Hortik aurrera, nire kabuz, `p5js` erremintarekin jolasten hasi nintzen. Hainbat froga egin ondoren, motibazio guztiarekin, [sayagata](https://github.com/Txarli/sayagata) proiektua sortu nuen. [Sayagata](https://commons.wikimedia.org/wiki/Category:Sayagata), patroiak sortzeko japoniar tradizio bat da. Patroien kontzeptua gustoko nuen eta, hitzaren sonoritateak, maitemindu ninduen. Ez nion buelta askorik eman... -Edonola ere, denbora luzez Github-en lotan egon ondoren, Sayagata proiektua berriz ere altxatu dut [sayagata.txarli.dev](https://sayagata.txarli.dev) URL-an. Bertan, ausazko nabigazio baten bitartez, nik sortutako patroi batzuk ikus daitezke. Patroi hauetako batzuk, [George Nees](https://en.wikipedia.org/wiki/Georg_Nees) edo [Vera Molnár](https://en.wikipedia.org/wiki/Vera_Moln%C3%A1r) artista generatiboen obretan *"inspiratuta"* daude. Beste batzuk, [Genuary](https://genuary.art/) taldeko jendeak proposatutako *prompt*-etan oinarritzen dira. +Edonola ere, denbora luzez Github-en lotan egon ondoren, Sayagata proiektua berriz ere altxatu dut [sayagata.txarli.dev](https://sayagata.txarli.dev) URL-an. Bertan, ausazko nabigazio baten bitartez, nik sortutako patroi batzuk ikus daitezke. Patroi hauetako batzuk, [George Nees](https://en.wikipedia.org/wiki/Georg_Nees) edo [Vera Molnár](https://en.wikipedia.org/wiki/Vera_Moln%C3%A1r) artista generatiboen obretan _"inspiratuta"_ daude. Beste batzuk, [Genuary](https://genuary.art/) taldeko jendeak proposatutako _prompt_-etan oinarritzen dira. ## Etorkizunerako ildoak diff --git a/content/posts/sobre-developers-y-buenas-personas.md b/content/posts/sobre-developers-y-buenas-personas.md index 8da1888..8c9be26 100644 --- a/content/posts/sobre-developers-y-buenas-personas.md +++ b/content/posts/sobre-developers-y-buenas-personas.md @@ -1,6 +1,5 @@ --- title: Sobre developers y (buenas) personas -slug: sobre-developers-y-buenas-personas description: >- Biko2 enpresako blogean idatzitako artikulu bat. tags: diff --git a/content/posts/sonder.md b/content/posts/sonder.md index d6a6be0..3acff61 100644 --- a/content/posts/sonder.md +++ b/content/posts/sonder.md @@ -1,6 +1,5 @@ --- title: Sonder -slug: sonder description: >- Sonder kontzeptuari buruzko hausnarketa bat eta Anariren kanta bat. tags: diff --git a/content/posts/un-enfoque-pragmatico-de-nuestros-tests-del-frontend.md b/content/posts/un-enfoque-pragmatico-de-nuestros-tests-del-frontend.md index 5c53d0a..bc10b16 100644 --- a/content/posts/un-enfoque-pragmatico-de-nuestros-tests-del-frontend.md +++ b/content/posts/un-enfoque-pragmatico-de-nuestros-tests-del-frontend.md @@ -1,6 +1,5 @@ --- title: Un enfoque pragmático de nuestros test del frontend -slug: un-enfoque-pragmatico-de-nuestros-tests-del-frontend description: >- Biko2 enpresako blogean idatzitako artikulu bat. tags: diff --git a/content/posts/zerbitzarian-lekua-egiten.md b/content/posts/zerbitzarian-lekua-egiten.md index 851e8d8..94c97a5 100644 --- a/content/posts/zerbitzarian-lekua-egiten.md +++ b/content/posts/zerbitzarian-lekua-egiten.md @@ -1,6 +1,5 @@ --- title: Zerbitzaria garbitzen -slug: zerbitzarian-lekua-egiten description: >- Ubuntu zerbitzari bateko (edo bezero bateko) diska gogorrean lekua egiteko estrategiak. tags: diff --git a/src/components/PostGrid.astro b/src/components/PostGrid.astro index 8f42290..0889553 100644 --- a/src/components/PostGrid.astro +++ b/src/components/PostGrid.astro @@ -8,10 +8,7 @@ interface Props { const { posts, hasRandomPost = false } = Astro.props; -const postSlugs = posts.reduce( - (slugs, { data: { slug } }) => [slug, ...slugs], - [], -); +const postSlugs = posts.reduce((slugs, { id }) => [id, ...slugs], []); function getTiltDegrees() { const degreeCollection = [0.5, 1, 1.5, 2]; @@ -23,9 +20,9 @@ function getTiltDegrees() {
    { - posts.map(({ data: { slug, title, description, tags } }) => ( + posts.map(({ id, data: { title, description, tags } }) => (
  • - + {title}
    diff --git a/src/content.config.ts b/src/content.config.ts index 3bcba03..6bdc80a 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -7,7 +7,6 @@ const posts = defineCollection({ loader: glob({ pattern: "*.md", base: "./content/posts" }), schema: z.object({ title: z.string(), - slug: z.string(), description: z.string(), added: z.union([z.string(), z.date()]), updated: z.union([z.string(), z.date()]).optional(), diff --git a/src/pages/post/[slug].astro b/src/pages/post/[slug].astro index c3950a5..370628d 100644 --- a/src/pages/post/[slug].astro +++ b/src/pages/post/[slug].astro @@ -7,7 +7,7 @@ export async function getStaticPaths() { return posts.map((post) => { return { - params: { slug: post.data.slug }, + params: { slug: post.id }, props: { post }, }; }); diff --git a/src/pages/rss.xml.js b/src/pages/rss.xml.js index e38c61e..f0931af 100644 --- a/src/pages/rss.xml.js +++ b/src/pages/rss.xml.js @@ -5,26 +5,26 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../config"; let posts = await getCollection("posts"); posts = posts.sort( - (a, b) => - new Date(b.data.updated || b.data.added).valueOf() - - new Date(a.data.updated || a.data.added).valueOf() + (a, b) => + new Date(b.data.updated || b.data.added).valueOf() - + new Date(a.data.updated || a.data.added).valueOf(), ); export const GET = () => - rss({ - title: SITE_TITLE || "", - description: SITE_DESCRIPTION || "", - site: import.meta.env.SITE, - items: posts.map((post) => { - return { - link: `/post/${post.data.slug}`, - title: post.data.title, - pubDate: post.data.added, - description: post.data.description, - content: post.rendered.html, - customData: `${ - post.data.updated ? post.data.updated : "" - }`, - }; - }), - }); + rss({ + title: SITE_TITLE || "", + description: SITE_DESCRIPTION || "", + site: import.meta.env.SITE, + items: posts.map((post) => { + return { + link: `/post/${post.id}`, + title: post.data.title, + pubDate: post.data.added, + description: post.data.description, + content: post.rendered.html, + customData: `${ + post.data.updated ? post.data.updated : "" + }`, + }; + }), + });