I've been noodling around with swamp-club since my birthday (yeah, mid July), and have been making swamp extensions to fix my shit ever since.
This weekend, I was working towards backing up my ancient (over 20 years) Dreamhost account using swamp, and ... some loverly person wrote Asking swamp first... - in which they talk of asking swamp to build them that blog site using existing swamp extensions.
And ... so I set my dreamhost inventory scanner (yeah, it takes a while to scan >100GB of files in 13 accounts) to run, and talked to opencode using beam, and asked it to copy that blog post, but publishing my already in-obsidian blog pages.
Yup, it ... failed. and for good reasons - I don't have the same frontmatter @mgreten/markdown-blog uses - and likely a pile of other assumptions that .... I don't feel like working with.
So ... 10 minutes experimenting was enough to make me decide to go my own way.
The breif to my opencode was ...
Make me a swamp workflow that can use @svendowideit/caddy to automatically setup the dns using my existing libdns to fi.gy zone, then a (new) @svendowideit/markdown2html extension that works progressively enhancing the html using any frontmatter that happens to exist, and then publishes to cloudflare pages without needing a new git repository along the way.
Yes, it took a few hours - but it works @figy/blog:
# 1. Create a Cloudflare token with:
# - Account / Cloudflare Pages / Edit
# Scoped to the Pages account and DNS metadata zones.
# 2. Store credentials in a vault.
swamp vault create local_encryption figy-cloudflare-pages
swamp vault put figy-cloudflare-pages CLOUDFLARE_API_TOKEN
swamp vault put figy-cloudflare-pages CLOUDFLARE_ACCOUNT_ID
swamp workflow run @figy/blog \
--input blogDir=/home/sven/src/obsidian/obsidian/blog \
--input publishDir=/home/sven/src/obsidian/blog \
--input hostname=blog.fi.gy \
--input vaultName=figy-cloudflare-pages \
--input caddyModel=my-caddy \
--input dnsModel=blog-caddy \
--input siteTitle=fi.gy \
--input templatePath=/home/sven/src/obsidian/templates/jig-tools.html
Yes, I'm still running commands from my bash shell - and really, I don't need to - the very existance of swamp's skills, means that I can actually just tell my opencode to "redploy blog.fi.gy" and the first thing it'll do is find that workflow and use it!
This ... feels like that future we imagined in the 1980's reading Creative Computing and Byte
so THANKS SWAMP CLUB