Simple blog site to post write ups. Content uses minimal formatting in Markdown. Servered up as HTML with basic navigation. https://posts.monoexp.com

bajdev f6bf569661 Merge branch 'feature/initial' of bajdev/posts into main пре 2 дана
content 0bd42c4219 Document file names and front matter in the hello-world post пре 2 дана
static 8ad17bd65c Add Markdown blog server пре 2 дана
templates 8ad17bd65c Add Markdown blog server пре 2 дана
.gitignore 8ad17bd65c Add Markdown blog server пре 2 дана
README.md c040eb584a Add README outlining the posts application пре 2 дана
feed.go 8ad17bd65c Add Markdown blog server пре 2 дана
go.mod 8ad17bd65c Add Markdown blog server пре 2 дана
go.sum 8ad17bd65c Add Markdown blog server пре 2 дана
main.go 8ad17bd65c Add Markdown blog server пре 2 дана
main_test.go 8ad17bd65c Add Markdown blog server пре 2 дана
posts.go 8ad17bd65c Add Markdown blog server пре 2 дана
posts_test.go 8ad17bd65c Add Markdown blog server пре 2 дана
render.go 8ad17bd65c Add Markdown blog server пре 2 дана

README.md

posts

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.

Writing a post

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...
  • title — falls back to the first # heading, then the slug.
  • date — falls back to the date in the filename.
  • summary — shown on the index page.
  • draft: true — hides the post everywhere.

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.

Pages

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.

Configuration

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

Development

go test ./...
PORT=8080 go run .

Deployment

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/.