Bradley McGill

What this site can do

· updated

Placeholder cover image — swap this for something real.

Keep this one around while you settle in, then delete it. Every feature below is already wired up, so there is nothing to install the first time you need a table or a footnote.

Code

Fenced blocks are highlighted at build time by Shiki, so no JavaScript ships to the browser to make this look right.1

SELECT
    t.name AS table_name,
    SUM(p.rows) AS row_count
FROM sys.tables AS t
JOIN sys.partitions AS p
    ON p.object_id = t.object_id AND p.index_id IN (0, 1)
GROUP BY t.name
ORDER BY row_count DESC;
export function slugify(input: string): string {
  return input
    .toLowerCase()
    .replace(/[^a-z0-9]+/g, '-')
    .replace(/^-|-$/g, '');
}

Inline code works too, as does a bare shell line:

npm run dev

Tables

Field Required Notes
title Yes Shown on the index and in the feed
description Yes Used for search results and social meta
date Yes Drives ordering and the year grouping
tags No Defaults to an empty list
draft No Defaults to false

Wide tables scroll sideways on a phone rather than squashing the text.

Images

Images sitting next to the post get optimised, resized and given width and height automatically, so the page does not jump around while they load.

A placeholder image, replace it with something real.

The cover image in this post’s frontmatter works the same way.

Quotes and lists

Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

  1. Ordered lists work
  2. So do nested ones
    • like this
    • and this
  3. Back to the top level

Footnotes

Footnotes are collected at the bottom of the post and linked both ways, so a reader can jump down and back without losing their place.2

Footnotes

  1. The highlighting theme is set in astro.config.mjs — change theme there and every code block on the site follows.

  2. Useful for the aside that would otherwise wreck a sentence.