app

command module
v0.0.0-...-f158703 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 160 Imported by: 0

README

GoBlog

GoBlog is a single-user, multi-blog platform written in Go. One binary, SQLite database, minimal dependencies. IndieWeb (IndieAuth, Micropub, Webmention) and ActivityPub support for Fediverse integration.

Philosophy
  • Opt-in features: most features disabled by default, enable only what you need
  • Markdown-first: write in Markdown with optional YAML front matter
  • No themes: customize through configuration, plugins, and custom CSS
  • Docker-friendly: designed to run in containers with simple volume mounts
  • Full ownership: your content, your database, your server

Quick Start

Create a docker-compose.yml:

services:
  goblog:
    container_name: goblog
    image: ghcr.io/jlelse/goblog:latest
    restart: unless-stopped
    volumes:
      - ./config:/app/config
      - ./data:/app/data
    ports:
      - "8080:8080"
    environment:
      - TZ=Europe/Berlin

Create minimal config at ./config/config.yml:

server:
  publicAddress: http://localhost:8080

Start:

docker-compose up -d
Build from Source
git clone https://github.com/jlelse/GoBlog.git
cd GoBlog
go build -tags=linux,libsqlite3,sqlite_fts5,gomailnotpl -o GoBlog
mkdir -p config data
echo 'server:
  publicAddress: http://localhost:8080' > config/config.yml
./GoBlog --config ./config/config.yml
First Steps
  1. Check the logs: On first startup, GoBlog generates a random password:
    Generated initial password for first-time setup. username=admin password=AbCdEfGhIjKlMnOpQrSt
    
  2. Open your browser: http://localhost:8080
  3. Log in: /login with username admin and the generated password
  4. Change your password: Go to /settings
  5. Create a post: Go to /editor

Alternatively, set credentials before first run:

./GoBlog --config ./config/config.yml setup --username admin --password "your-secure-password"
Data Storage

All data lives in the data directory:

  • data/db.sqlite: SQLite database
  • data/media/: Uploaded media (served at /m/)
  • data/profileImage: Profile image

Backup the data directory regularly.


Documentation

  • Configuration: YAML configuration, HTTPS, Docker, data storage
  • Settings UI: Blog, user, and security settings configurable via the web UI
  • Features: Writing posts, editor, comments, reactions, search, media, feeds, and more
  • IndieWeb & Fediverse: IndieAuth, Webmention, ActivityPub, Bluesky
  • Plugins: Plugin system, built-in plugins, creating custom plugins
  • CLI Commands: Server, setup, health check, export, follower management
  • Advanced Topics: Hooks, redirects, multiple blogs, performance tuning, troubleshooting
  • Testing: Test suite, integration tests, benchmarks

Key Features

Core
  • Markdown posts with YAML front matter
  • Multiple blogs under one installation
  • Sections, taxonomies, and custom path templates
  • Web editor with live preview and formatting toolbar
  • Media uploads with optional image optimization (imgproxy)
  • Full-text search (SQLite FTS5)
  • RSS, Atom, and JSON feeds
  • XML sitemap and robots.txt
  • Login with username/password and 2FA (TOTP), WebAuthn (passkeys), or OIDC (OpenID Connect)
IndieWeb & Fediverse
  • IndieAuth: Use your blog as your identity
  • Micropub: Create/update/delete posts via API
  • Webmention: Send and receive webmentions automatically
  • ActivityPub: Publish to Mastodon, Pleroma, and other Fediverse platforms
  • Bluesky/ATProto: Post links to Bluesky
Optional Features (Opt-in)
Feature Description
Comments Via Webmention or ActivityPub
Reactions Emoji reactions on posts
Search Full-text search (SQLite FTS5)
Photos Gallery of all posts with images
Map Posts with locations/GPX tracks on a map
Blogroll Display blogs you follow via OPML
Statistics Posts per year and monthly chart
Random Post Redirect to a random post
On This Day Posts from this day in previous years
Contact Form SMTP-based contact form
Text-to-Speech Google Cloud TTS or Mistral audio generation
Notifications Ntfy, Telegram, or Matrix push notifications
Short URLs Custom short domain for compact links
Image Optimization Automatic AVIF/JPEG/PNG variants via imgproxy
Tor Hidden Service .onion address
IndexNow Notify search engines of new content
Private Mode Login-only access
Announcement Banner Site-wide banner for announcements

Built-in: RSS, Atom, JSON feeds, XML sitemap, robots.txt, microformats2 markup.


Configuration

Configuration is done via a YAML file (default: ./config/config.yml).

server:
  publicAddress: http://localhost:8080

All other settings have sensible defaults. See example-config.yml for the full reference and docs/configuration.md for detailed explanations.

Blog title, description, sections, and many other settings are configured via the Settings UI (/settings), not YAML.


Plugins

GoBlog has a runtime plugin system (based on Yaegi). See docs/plugins.md for full details.

Built-in plugins: Custom CSS, Syndication Links, SocialSpec, Webrings, AI Summary, AI Image Captions, Snow Animation, AI Bot Block, Image Tooltips, Telegram Bot, MCP Server.


Administration

Quick Reference
Path Purpose
/login, /logout Authentication
/settings User and blog settings
/editor Post editor
/webmention Manage webmentions
/comment Manage comments
/notifications View notifications
/reload Reload router
CLI Commands
./GoBlog --config ./config/config.yml                              # Start server
./GoBlog --config ./config/config.yml setup --username admin --password "pass"  # Setup credentials
./GoBlog --config ./config/config.yml healthcheck                  # Health check
./GoBlog --config ./config/config.yml check --ignore-403           # Check external links
./GoBlog --config ./config/config.yml export ./exported            # Export posts

See docs/cli.md for full reference.


Getting Help


License

MIT License. See LICENSE for details.

Documentation

Overview

Package main is the entry point for GoBlog.

Directories

Path Synopsis
pkgs
activitypub
Package activitypub provides types and utilities for working with ActivityPub objects.
Package activitypub provides types and utilities for working with ActivityPub objects.
activitypub/jsonld
Package jsonld provides JSON-LD context handling for ActivityPub objects
Package jsonld provides JSON-LD context handling for ActivityPub objects
bodylimit
Package bodylimit provides HTTP request body size limiting middleware.
Package bodylimit provides HTTP request body size limiting middleware.
bufferpool
Package bufferpool provides a sync.Pool for bytes.Buffer instances.
Package bufferpool provides a sync.Pool for bytes.Buffer instances.
builderpool
Package builderpool provides a sync.Pool for strings.Builder instances.
Package builderpool provides a sync.Pool for strings.Builder instances.
cache
Package cache provides a generic cache implementation.
Package cache provides a generic cache implementation.
contenttype
Package contenttype defines common content type constants.
Package contenttype defines common content type constants.
gpx
Package gpx provides a lean GPX parser and helpers.
Package gpx provides a lean GPX parser and helpers.
htmlbuilder
Package htmlbuilder provides an HTML builder for constructing HTML content.
Package htmlbuilder provides an HTML builder for constructing HTML content.
httpcachetransport
Package httpcachetransport provides a caching HTTP transport.
Package httpcachetransport provides a caching HTTP transport.
httpcompress
Package httpcompress provides HTTP response compression middleware.
Package httpcompress provides HTTP response compression middleware.
maprouter
Package maprouter provides a map-based HTTP request router.
Package maprouter provides a map-based HTTP request router.
mark
Package mark provides a goldmark extension that adds support for the ==mark== inline syntax, rendered as <mark> elements.
Package mark provides a goldmark extension that adds support for the ==mark== inline syntax, rendered as <mark> elements.
minify
Package minify provides HTML, CSS, and JS minification.
Package minify provides HTML, CSS, and JS minification.
mocksmtp
Package mocksmtp provides a mock SMTP server for testing.
Package mocksmtp provides a mock SMTP server for testing.
mp3merge
Package mp3merge provides MP3 file merging functionality.
Package mp3merge provides MP3 file merging functionality.
phash
Package phash provides perceptual image hashing (dHash).
Package phash provides perceptual image hashing (dHash).
plugins
Package plugins provides plugin loading functionality for GoBlog.
Package plugins provides plugin loading functionality for GoBlog.
plugins/sample/src/sample
Package sample provides a sample GoBlog plugin.
Package sample provides a sample GoBlog plugin.
plugintypes
Package plugintypes defines the plugin interface types for GoBlog.
Package plugintypes defines the plugin interface types for GoBlog.
tor
Package tor provides Tor hidden service support.
Package tor provides Tor hidden service support.
utils
Package utils provides common utility functions.
Package utils provides common utility functions.
yaegiwrappers
Package yaegiwrappers contains yaegi interpreter wrapper symbols.
Package yaegiwrappers contains yaegi interpreter wrapper symbols.
plugins
aibotblock/src/aibotblock
Package aibotblock provides an AI bot blocking plugin for GoBlog.
Package aibotblock provides an AI bot blocking plugin for GoBlog.
aiimage/src/aiimage
Package aiimage provides an AI image generation plugin for GoBlog.
Package aiimage provides an AI image generation plugin for GoBlog.
aitldr/src/aitldr
Package aitldr provides an AI TLDR plugin for GoBlog.
Package aitldr provides an AI TLDR plugin for GoBlog.
customcss/src/customcss
Package customcss provides a custom CSS plugin for GoBlog.
Package customcss provides a custom CSS plugin for GoBlog.
demo/src/demo
Package demo provides a demo plugin for GoBlog.
Package demo provides a demo plugin for GoBlog.
imagetooltips/src/imagetooltips
Package imagetooltips provides an image tooltips plugin for GoBlog.
Package imagetooltips provides an image tooltips plugin for GoBlog.
mcp/src/mcp
Package mcp provides an MCP server plugin for GoBlog.
Package mcp provides an MCP server plugin for GoBlog.
snow/src/snow
Package snow provides a snow effect plugin for GoBlog.
Package snow provides a snow effect plugin for GoBlog.
socialspec/src/socialspec
Package socialspec provides a SocialSpec plugin for GoBlog.
Package socialspec provides a SocialSpec plugin for GoBlog.
syndication/src/syndication
Package syndication provides a syndication plugin for GoBlog.
Package syndication provides a syndication plugin for GoBlog.
telegrambot/src/telegrambot
Package telegrambot provides a Telegram bot plugin for GoBlog.
Package telegrambot provides a Telegram bot plugin for GoBlog.
webrings/src/webrings
Package webrings provides a webrings plugin for GoBlog.
Package webrings provides a webrings plugin for GoBlog.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址