Files
AstralRinth/packages/blog
Alejandro González 8b98087936 fix(blog): resolve relative URLs in Markdown images and links with a fixed base (#4287)
These changes add a layered hook to the `markdown-it` renderer rules to
resolve `<img>` element `src` attributes and `<a>` element `href`
attributes to a path-absolute relative URL, to ensure that such URLs
always point to the same resource URL even when the URL the current
resource is being viewed from changes.

This fixes an issue with relative links and image source URLs being
broken when a blog post was watched from a URL that lacked a trailing
slash, as web browsers adjust the path relative URLs are resolved from
depending on whether such character is present, and we didn't account
for that.

While at it, I've rebuilt all the blog posts and their associated RSS
feed.
2025-08-29 13:44:03 +00:00
..
2025-08-28 22:11:35 +00:00
2025-06-30 18:59:08 -07:00
2025-06-30 18:59:08 -07:00
2025-06-30 18:59:08 -07:00

Modrinth Blog Articles

This package contains the articles for the Modrinth blog. The articles are written in Markdown and are rendered on the Modrinth website.

How to add a new article

Write your article in the articles directory. The filename should be the slug of the article, and the file should have a .md extension. The first line of the file should be the frontmatter, which contains metadata about the article such as the title, summary and date of writing.

Example Frontmatter

---
title: Quintupling Creator Revenue and Becoming Sustainable
short_title: Becoming Sustainable
summary: Announcing an update to our monetization program, creator split, and more!
short_summary: Announcing 5x creator revenue and updates to the monetization program.
date: 2024-09-13T12:00:00-08:00
---

You can link other articles in the frontmatter, but it's recommended you're explicit about it, for example: https://modrinth.com/news/article/... instead of /news/article/.... It's not a requirement though, you just have to be careful about it.

You can place images in the public/{slug}/... directory, the thumbnail must be a .webp file named thumbnail.webp in the same public directory.