--- import Layout from '../layouts/Layout.astro' import { Page, Row, Logo } from '../../@dasig' import ArticleCard from '../components/ArticleCard.astro' const articles = Object.values(import.meta.glob('../content/articles/*.md', { eager: true })) function getArticleData(post: any) { const slug = post.frontmatter.slug const alt = slug.replace(/-/g, ' ') const category = post.frontmatter.category let categoryColor if (category === 'Technology') { categoryColor = 'blue' } else if (category === 'Poem') { categoryColor = 'yellow' } return { category: post.frontmatter.category, categoryColor: categoryColor, url: `read/${slug}`, title: post.frontmatter.title, subtitle: post.frontmatter.subtitle, imageA: `../@dasig/images/${slug}.avif`, imageW: `../@dasig/images/${slug}.webp`, alt: alt, minutes: post.frontmatter.minutes, date: post.frontmatter.date, } } ---

Pat's Articles

{ articles.map((post: any) => { const data = getArticleData(post) return }) }