Markdown edit tool
2026-06-05
Vibecoded a new tool today: vibemdedit. it's super simple: allow a browser to edit markdown files on a server.
not sure which one of these i should feel like:

Since my website is made out of markdown files, and i'm planning to write all my documentation in markdown too, i figured: why not add an edit button?
This is that edit button. i am currently writing this blog post from it (it can create new files too).
current implementation (v1) simply triggers when you add a certain subdomain to the website. since in my setup, the file paths and the URL paths are usually exact matches apart from a .md file extension, this allows us to very easily match the two and use that principle to create files as well.
it sits behind authelia, here it being a subdomain also simplifies the configuration - all requests for the editing subdomain NEED to be authenticated, but the normal site can stay public.
Right now there's no functionality for "rebuilding" the site on save. for testing i set up a small inotifywait command that runs updatesite.sh whenever a file changes, and it needs an extra browser refresh to show up with the new content. next version should trigger that automatically on save, and hopefully browser cache won't ruin my plans again.
UPDATE: just added a "post save hook" that runs some arbitrary script
works from mobile too
TODO: add that little "edit" link to all my pages (ideally ONLY when authenticated - can use javascript here, since displaying the page is still fine without JS but editing will require JS for now
sadly, we cant query authelia for the login status to find out whether to show the edit button or not. What we can and maybe will do: add a small "settings" page somewhere (can be mostly hidden) that lets you toggle whether to see edit buttons or not, and then let the tiny JS snippet read browser's localstorage to decide whether to show it.
OMG ITS DONE IT WORKS