My personal site, rewritten using Next.js.
Of most interest, this uses the new-style Next.js App Router, as opposed to the older "Pages Router" that the tutorial uses.
This code is run locally & used to statically generate Toast Driven. This is likely only mostly useful to me, but feel free to refer to it and/or use code from it.
Gotta have Node installed locally (20.6.1
, installed via asdf
). You'll also want Just.
$ npm i
$ cp -i .env.example .env
Create the correct subdirectories in posts/
for year/month/day, then create the post itself using Markdown.
A template:
---
title: 'The Title Goes Here'
date: 'YYYY-MM-DD'
time: 'HH:MM:SS'
author: 'Daniel'
slug: 'the-slug-goes-here'
---
The post itself goes here...
Then you can generate & upload in a single go with $ just refresh
.
$ npm run dev
Then hit http://localhost:3000 in your browser.
$ just build
$ just upload