Post IDs & Custom IDs
You might want to use a custom URI for a posts:
---
title: "Using A Custom Post ID"
publish: 2025-03-16 12:13:13
id: thingstuff
tags: about-ids
summary: "Showing a custom ID..."
---
This will be served under:
http://127.0.0.1:8081/post/thingstuff/
where “thingstuff” is used instead of the filename of the post markdown. The filename of this post is “custom-id.md” (you can name posts whatever you want), so without the ID set in metadata the local url would look like:
http://127.0.0.1:8081/post/custom-id/
If there are more than one files named the same (across different post directories for instance) the ID will have a small random suffix added to prevent collision.
A good practice is to name files with two pieces of information, say, date and title. For instance:
20230330-custom-ids.md
Naming like this, consistently, means you’ll be able to easily glance over the file tree to see your posts and also likely avoid naming two files the same thing. One of the purposes of Magnet is to keep everything within a human scope — instead of building and querying a database about your posts, simply use a file tree of plaintext.