Index Expansion

Published: 12/31/23

Author: Joshua Randall

Gojo Domain Expansion

I have made a few significant changes to the landing page of the main site, by finally adding two extra sections that automatically change to the latest post/project that has been pushed to the site.

Index Section Code

By using a couple of asyncronous functions in the frontmatter of the index page, we can grab the latest post in the array and the data associated with it. If you are curious to see how it works in its entirety, the code is publically available in the site’s Github Repository.

I also added a couple of template markdown files so that it is easier for me to create posts in the future.

Example:

---
title: 'Title'
date: "M/DD/YY"
author: "Joshua Randall"
description: 'Description'
image:
    url: 'Image URL'
    alt: 'Image Description'
layout: ../../layouts/BlogLayout.astro
draft: true
---

Enter page content here