💡 Comments + new blog post

This commit is contained in:
2025-09-01 12:15:59 -04:00
parent 808bec174e
commit e2c1919cd7
12 changed files with 89 additions and 7012 deletions
File diff suppressed because one or more lines are too long
-6944
View File
File diff suppressed because it is too large Load Diff
+41 -41
View File
@@ -1,43 +1,43 @@
{
"name": "ghall.blog",
"type": "module",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"lint": "eslint --ext .js --ext .ts --ext .astro"
},
"dependencies": {
"@astrojs/alpinejs": "^0.4.8",
"@astrojs/mdx": "^4.3.4",
"@astrojs/rss": "^4.0.12",
"@types/alpinejs": "^3.13.11",
"@types/markdown-it": "^14.1.2",
"alpinejs": "^3.14.9",
"astro": "^5.13.3",
"astro-pagefind": "^1.7.0",
"date-fns": "^4.1.0",
"markdown-it": "^14.1.0",
"pagefind": "^1.3.0",
"sanitize-html": "^2.14.0",
"sharp": "^0.33.5"
},
"devDependencies": {
"@astrojs/ts-plugin": "^1.10.4",
"bun-types": "latest",
"eslint": "^9.18.0",
"eslint-plugin-astro": "^1.3.1",
"eslint-plugin-prettier": "^5.2.3",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"typescript-eslint": "^8.21.0"
},
"module": "index.ts",
"peerDependencies": {
"typescript": "^5.7.3"
}
"name": "ghall.space",
"type": "module",
"version": "2.0.0",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"lint": "eslint --ext .js --ext .ts --ext .astro"
},
"dependencies": {
"@astrojs/alpinejs": "^0.4.8",
"@astrojs/mdx": "^4.3.4",
"@astrojs/rss": "^4.0.12",
"@types/alpinejs": "^3.13.11",
"@types/markdown-it": "^14.1.2",
"alpinejs": "^3.14.9",
"astro": "^5.13.3",
"astro-pagefind": "^1.7.0",
"date-fns": "^4.1.0",
"markdown-it": "^14.1.0",
"pagefind": "^1.3.0",
"sanitize-html": "^2.14.0",
"sharp": "^0.33.5"
},
"devDependencies": {
"@astrojs/ts-plugin": "^1.10.4",
"bun-types": "latest",
"eslint": "^9.18.0",
"eslint-plugin-astro": "^1.3.1",
"eslint-plugin-prettier": "^5.2.3",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"typescript-eslint": "^8.21.0"
},
"module": "index.ts",
"peerDependencies": {
"typescript": "^5.7.3"
}
}
+4 -20
View File
@@ -7,8 +7,8 @@ import { navLinks } from '../../data/nav-links';
<!-- drawerOpened is defined in /src/layouts/Layout.astro -->
<div class="drawer-container" @keydown.escape="drawerOpen = false">
<button @click="drawerOpen = !drawerOpen">
<BarsIcon class="bars-icon" width={24} height={24} />
<button class="icon-button" @click="drawerOpen = !drawerOpen">
<BarsIcon width={24} height={24} />
</button>
<div
class="overlay"
@@ -29,8 +29,8 @@ import { navLinks } from '../../data/nav-links';
x-transition:leave-end="hidden-drawer"
>
<div>
<button @click="drawerOpen = !drawerOpen">
<CloseIcon class="bars-icon" width={24} height={24} /></button
<button class="icon-button" @click="drawerOpen = !drawerOpen">
<CloseIcon width={24} height={24} /></button
>
</div>
<nav>
@@ -44,22 +44,6 @@ import { navLinks } from '../../data/nav-links';
--transition: all 0.3s ease-in-out;
}
button {
background: none;
padding: 2px 2px -2px;
border: none;
line-height: 1;
aspect-ratio: square;
}
button:active {
opacity: 0.3;
}
button > svg {
color: var(--text);
}
.drawer-container {
display: none;
}
-1
View File
@@ -9,7 +9,6 @@
)
.then((data) => {
const item = data.querySelector('item');
console.log(item)
this.latestPost = {
link: item.querySelector('link').textContent,
body: item.querySelector('description').textContent,
@@ -0,0 +1,14 @@
---
title: 'The New ghall.space'
pubDate: '9/1/25'
tags: ['Meta', 'Programming', 'Webdev']
---
It's been a while since I originally built this website, which started life as a little project to learn the, at the time, brand new web framework Astro. My skills in web development have improved greatly in that time, as has the functionality of the Astro framework. Therefore, I thought it would be a fun project to make some improvements to the site, both visually and in how the codebase is structured.
One of the biggest front-facing changes I've made, aside from new typography and some layout adjustments, is a mobile-responsive navigation bar. Mobile is always something I've been conscious of when building this site, but I opted for a simplified approach by ensuring the site was usable on mobile without introducing many responsive elements. But as the site morphed from a simple blog to a more generalized space on the internet (hence the ".space" TLD), I've discovered the limits of that design philosophy.
Behind the scenes, there have been a few changes as well. I originally built this site with Astro version 1.6.13, and I have periodically upgraded it over time. Today, it's using Astro 5.13.3, and while it's a credit to the Astro framework that the codebase for this site has seen very few upgrade-related changes over the various versions, some annoying tech debt has been building up especially around [content collections](https://docs.astro.build/en/guides/content-collections/), which the blog section of this site relies on, and has been coasting along on legacy support for a previous implementation.
Finally, I didn't fully appreciate Astro's support for scoped styles when I originally built this site. I pretty much dumped everything in a _global.css_ file, which would have been fine, but over time I started using scoped styles and it became a bit confusing where the styles for various elements were. So, as part of this revamp, I finally moved CSS that should be scoped into its respective page or component files.
This is far from the final version of this revamp, but I think the design and structural changes will make it much easier to improve and build upon what's here. Addressing the tech debt will also allow me to make use of some newer features, especially around content collections, and hopefully make future upgrades to the Astro framework and its associated dependencies more painless.
+22
View File
@@ -67,6 +67,8 @@ main p {
line-height: 1.5;
}
/* Article image style */
article img {
border-radius: var(--radius);
display: block;
@@ -75,6 +77,8 @@ article img {
height: auto;
}
/* Typography */
.footnotes {
font-size: 1rem;
}
@@ -110,3 +114,21 @@ kbd {
font-size: 0.85rem;
white-space: nowrap;
}
/* Icon button */
.icon-button {
background: none;
padding: 2px 2px -2px;
border: none;
line-height: 1;
aspect-ratio: square;
}
.icon-button:active {
opacity: 0.3;
}
.icon-button > svg {
color: var(--text);
}
+1
View File
@@ -44,6 +44,7 @@ const title = Astro.props.title || Astro.props.frontmatter?.title || 'Unknown';
</html>
<style>
/* Prevent scrolling when drawer (located in Header) is open */
.lock-scroll {
overflow: hidden;
}
+2 -3
View File
@@ -24,9 +24,8 @@ const { page } = Astro.props;
---
<Layout title="Blog Archive">
<ul>
{page.data.map((post) => <PostPreview post={post} />)}
</ul>
{page.data.map((post) => <PostPreview post={post} />)}
<div class="pagination">
{
page.currentPage !== 1 ? (
-1
View File
@@ -53,7 +53,6 @@ posts.sort(
{
posts.map((post) => (
<li>
{console.log(post)}
<a href={`/posts/${post.id}`}>{post.data.title}</a> -
<span>
{format(
+2 -1
View File
@@ -2,8 +2,9 @@
layout: ../layouts/Layout.astro
title: Now
---
# Now
Hey there, this is my [/now page](https://nownownow.com/about)!
What's a [Now page](https://nownownow.com/about)?
_Last updated: August 29, 2025_
+2
View File
@@ -3,6 +3,8 @@ layout: ../layouts/Layout.astro
title: Projects
---
# Projects
## Mac Apps
### [AutoDock](https://github.com/ghall89/AutoDock)