Simple blog site to post write ups. Content uses minimal formatting in Markdown. Servered up as HTML with basic navigation. https://posts.monoexp.com
|
|
2 zile în urmă | |
|---|---|---|
| README.md | 2 zile în urmă |
A small Go application that serves a Markdown blog at https://posts.monoaf.com.
Each Markdown file in content/ is one blog post. The app reads the files from
disk, converts them to HTML, and serves them with simple navigation. Adding or
editing a post does not require restarting the app.
Create content/YYYY-MM-DD-slug.md. Front matter is optional:
---
title: My first post
date: 2026-10-24
summary: One line shown on the index page.
draft: false
---
Post body in Markdown...
# heading, then the slug.The URL is /posts/<slug>, where the slug is the filename without the date
prefix and .md extension.
Posts go through the normal branch-and-PR flow; never push to main.
| Route | Page |
|---|---|
/ |
All posts, newest first |
/posts/<slug> |
One post, with previous/next links |
/feed.xml |
RSS feed |
| anything else | 404 page |
Markdown is rendered with goldmark (CommonMark plus GitHub-style tables, strikethrough and autolinks). Raw HTML in posts is not rendered.
Environment variables (on the server, in /etc/goapps/posts.env):
| Variable | Default | Meaning |
|---|---|---|
PORT |
(required) | Port to listen on, bound to 127.0.0.1 |
CONTENT_DIR |
content |
Directory holding the .md posts |
SITE_URL |
https://posts.monoaf.com |
Absolute base URL used in the RSS feed |
go test ./...
PORT=8080 go run .
Runs as systemd unit goapp@posts on port 8002 behind nginx. Deploy with:
deploy-go posts --content
which builds and installs the binary and syncs content/ to
/opt/apps/posts/content/.