11---
2- import BaseHead from ' ../../ components/BaseHead.astro' ;
3- import Header from ' ../../ components/Header.astro' ;
4- import Footer from ' ../../ components/Footer.astro' ;
5- import { SITE_TITLE , SITE_DESCRIPTION } from ' ../../ consts' ;
2+ import BaseHead from ' ../components/BaseHead.astro' ;
3+ import Header from ' ../components/Header.astro' ;
4+ import Footer from ' ../components/Footer.astro' ;
5+ import { SITE_TITLE , SITE_DESCRIPTION } from ' ../consts' ;
66import { getCollection } from ' astro:content' ;
7- import FormattedDate from ' ../../ components/FormattedDate.astro' ;
7+ import FormattedDate from ' ../components/FormattedDate.astro' ;
88
99const posts = (await getCollection (' blog' ))
1010 .filter (post => post .data .track === ' engineering' )
@@ -15,6 +15,11 @@ const getImageUrl = (heroImage) => {
1515 if (! heroImage ) return ' ' ;
1616 return heroImage .startsWith (' /' ) ? ` ${import .meta .env .BASE_URL }/${heroImage .slice (1 )} ` : heroImage ;
1717};
18+
19+ // Helper function to get the correct post URL for engineering posts
20+ const getPostUrl = (post ) => {
21+ return ` ${import .meta .env .BASE_URL }/engineering/${post .id .replace (' engineering/' , ' ' )} ` ;
22+ };
1823---
1924
2025<!doctype html >
@@ -119,7 +124,7 @@ const getImageUrl = (heroImage) => {
119124 {
120125 posts .map ((post ) => (
121126 <li >
122- <a href = { ` /blog/${ post . id }/ ` } >
127+ <a href = { getPostUrl ( post ) } >
123128 <img width = { 720 } height = { 360 } src = { getImageUrl (post .data .heroImage )} alt = " " />
124129 <h4 class = " title" >{ post .data .title } </h4 >
125130 <p class = " date" >
0 commit comments