Skip to content

swmcc/swmcc.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

126 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

swm.cc

Personal website for Stephen McCullough, built with Astro and deployed to GitHub Pages.

🌐 Visit Site

Features

  • πŸ“ Blog and notes sections with Markdown support
  • πŸŒ“ Dark/light mode toggle with system preference detection
  • 🎨 Clean, minimalist design using Tailwind CSS
  • πŸš€ Fast loading with minimal JavaScript
  • πŸ“± Fully responsive
  • πŸ“‘ RSS feed for blog posts and notes
  • πŸ—ΊοΈ Automatic sitemap generation
  • πŸ” SEO optimised with meta tags and Open Graph support

Getting Started

Prerequisites

  • Node.js 20 or later
  • npm or pnpm
  • make (optional, for using Makefile commands)

Installation

make local.install
# or
npm install

Development

make local.dev
# or
npm run dev

Open http://localhost:4321 to see the site.

Build

make local.build
# or
npm run build

The built site will be in the dist/ directory.

Preview Production Build

make local.preview
# or
npm run preview

Other Commands

make local.check        # Run Astro type checking
make local.clean        # Clean build artifacts
make branch             # Show current git branch

Testing

End-to-end tests are written with Playwright and run against the built site.

Run Tests

npm run test

Run Tests with UI

npm run test:ui

What's Tested

  • Homepage loads correctly
  • Navigation links work
  • Dark mode toggle
  • Writing/Blog pages (list and individual posts)
  • Notes pages (list and individual notes)
  • Now page
  • About page
  • Projects page
  • RSS feed accessibility
  • Basic accessibility (heading hierarchy, image alt text)

Tests run automatically on pull requests via GitHub Actions.

Content Management

Adding Writing (Blog Post)

Use the Makefile shortcut (recommended):

make content.writing

This will prompt you for the title, description, slug, and tags, then create the file with proper frontmatter and open it in your editor.

Or manually create a new Markdown file in src/content/writing/:

---
title: "Your Post Title"
description: "Brief description for SEO"
pubDate: 2025-11-05
tags: ["typescript", "astro"]
---

Your content here...

Adding a Note

Use the Makefile shortcut (recommended):

make content.note

This will prompt you for the title, slug, and tags, then create the file with proper frontmatter and open it in your editor.

Or manually create a new Markdown file in src/content/notes/:

---
title: "Quick Note About X"
pubDate: 2025-11-05
tags: ["javascript"]
---

Brief content...

Adding a Thought

Use the Makefile shortcut (recommended):

make content.thought

This will prompt you for the slug and optional tags, then create the file with proper frontmatter (including current time) and open it in your editor.

Or manually create a new Markdown file in src/content/thoughts/:

---
pubDate: 2025-11-05
pubTime: "18:30"
tags: ["meta"]
---

Your thought here...

Updating the Now Page

Edit src/content/now/current.md:

---
updatedDate: 2025-11-05
---

## What I'm up to

Currently working on...

Deployment

The site automatically deploys to GitHub Pages when you push to the main branch.

Deploy

make production.deploy
# or
git push origin main

Monitor Deployment

make production.logs      # View recent GitHub Actions runs
make production.status    # View current deployment status

Initial Setup

  1. Go to your GitHub repository Settings β†’ Pages
  2. Under "Build and deployment", select "GitHub Actions"
  3. Under "Custom domain", enter swm.cc
  4. Ensure DNS is configured with a CNAME record pointing to your GitHub Pages URL

Project Structure

/
β”œβ”€β”€ .github/workflows/   # GitHub Actions deployment
β”œβ”€β”€ public/              # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/      # Reusable Astro components
β”‚   β”œβ”€β”€ content/         # Markdown content
β”‚   β”‚   β”œβ”€β”€ blog/
β”‚   β”‚   β”œβ”€β”€ notes/
β”‚   β”‚   └── now/
β”‚   β”œβ”€β”€ layouts/         # Page layouts
β”‚   β”œβ”€β”€ pages/           # Routes (becomes URLs)
β”‚   β”œβ”€β”€ styles/          # Global styles
β”‚   └── utils/           # Helper functions
β”œβ”€β”€ astro.config.mjs     # Astro configuration
β”œβ”€β”€ claude.md            # Project documentation
└── package.json

Technical Details

  • Framework: Astro v5
  • Styling: Tailwind CSS v4
  • Content: Markdown with frontmatter
  • Deployment: GitHub Pages via GitHub Actions
  • Domain: swm.cc (custom domain)

Development Notes

See claude.md for detailed project documentation, including:

  • Architecture decisions
  • Content workflow
  • Maintenance guidelines
  • Troubleshooting

Licence

Content: All rights reserved Code: MIT Licence

About

Source for my personal site.

Topics

Resources

Stars

Watchers

Forks

Contributors