This blog has no database and no login screen. A post is just a text file sitting in a folder. That’s the whole trick.
The usual way vs. our way
// HOW A POST GETS ON SCREEN 2
PARAMS
- Typical blog (WordPress)
- Write in editor → save to database → fetch on every visit
- This blog
- Write a text file → done
There’s no separate publishing step: saving the file is the post going live.
How it actually works
- STEP 1
Write the file
A post is a plain Markdown file (regular text with light formatting) sitting in a folder.
- STEP 2
The site finds it
When the site builds, one line of code scans the folder and grabs every post automatically.
- STEP 3
It gets wrapped and styled
The title, date, and layout are added for you, so the post file only needs the words.
That “one line of code” really is one line:
src/routes/findings/+layout.svelte ts
const modules = import.meta.glob('./*/+page.svx', { eager: true }); // STAT
1 line of code
finds and indexes every post on the site