Tags And Authors

Metadata at the top of each Markdown post can include Tags and Authors.

---
title: "More About Rocks"
publish: 2025-03-01 10:00:00
tags: ["Rocks"]
authors: ["Susan Essay"]
summary: "More than you ever wanted to know about rocks..."
---

Also, Tags and Authors can be included in the Post Settings file:

---
name: "Susan's Posts"
archive: true
blogroll: true
authors: ["Susan Essay"]
tags: ["Geology"]

Tags and Authors for each post are amended — so if the post meta has tags “things, stuff” and the post settings has “geology” then the published post will have the tags “things, stuff, geology”. Likewise Authors.

Post IDs & Custom IDs

This post is about creating 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.

Removing A Post

If you want to remove a post then delete the markdown file and rerun the “go-magnet show” command or add:

live: false

to the metadata in the markdown of the entry you want to unpublish.

Images

Including Local Images

Including images in a post is done in Markdown.

Take a look at the file “posts/images.md”, you’ll see that there are local images and remote images in the markdown. This one for instance:

Including Remote Images

You can include images from remote sources by using the remote url in the markdown. The image will be pulled down and placed into your images directory, and it should only do this once.

Since we can’t rely on the original name being well-formed or unique, the remote image gets renamed when it is saved. See which image extensions are the default here.

Images Index

An image index is created in the “indices” directory so that remote images are only pulled down once. If you need to re-pull images either edit or remove the “images.json” file in the “indices” directory.

Images Error Index

If there’s an error pulling down a remote image, information is left in the “images-err.json” file in indices. There’s a waiting period before the image can be retried, to be polite to remote servers, which is set here.

Basic HTML

Basic HTML should render properly.

Here’s a table:

cell one cell two

An H3, p tag:

Test

And this paragraph has a p tag with a css class.

Complex HTML alongside markdown may not render properly, so stick with markdown as much as you can.

page 2 of 3 « previous next »