blog.bunko.me — flat-file markdown blog with RSS
  • HTML 63.6%
  • Python 35.6%
  • Dockerfile 0.8%
Find a file
bunko 53cfa1bbcf Add image upload + wire markdown toolbar to admin editor
POST /admin/upload-image accepts multipart files with allowed image
extensions, caps at 10 MB, writes them to /app/data/images/ with a
random hex filename, and returns {url: "/blog/images/<hex>.<ext>"}.
GET /images/{filename} serves them publicly (post images are
embedded in public posts) with explicit path-traversal guards.

The admin/new.html and admin/edit.html templates now load the shared
markdown-editor.js after the form and call MarkdownEditor.attach on
the body textarea, pointing at /blog/admin/upload-image. Drag-into
and paste-from-clipboard image flows work with no other UI changes.

The /admin/* prefix means Caddy's existing forward_auth gates the
upload endpoint; /blog/images/* stays public, which is what we want.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 13:51:05 -05:00
app Add image upload + wire markdown toolbar to admin editor 2026-05-08 13:51:05 -05:00
.gitignore init: blog.bunko.me — flat-file markdown blog with RSS 2026-05-07 13:22:52 -05:00
docker-compose.yml refactor: use shared notebook.css for design tokens & base styles 2026-05-07 13:57:17 -05:00