Comment by f311a
11 hours ago
My blog is fully static and I have a 50-line CF worker script that sends comments to me which I import directly to markdown of a blog post. There are ways to do comments without embedding.
11 hours ago
My blog is fully static and I have a 50-line CF worker script that sends comments to me which I import directly to markdown of a blog post. There are ways to do comments without embedding.
Would be neat to automate the comment-with-markdown as a commit/PR? Like using Pull request as comment moderation
Would be cooler if it really was ColdFusion. Of course, 50 lines wouldn’t get you very far.
Tangential, but recently I dove down the ColdFusion rabbit hole again.
My first job after dropping out of college was working with Flash and ColdFusion in 2012. Even by that time it was dated, but it was my first real dive into network and server programming so I do look at those days rather fondly.
CFML is one of those things that is simultaneously a brilliant and terrible product. The terrible part is obvious: it's a bloated language that doesn't lend itself terribly well to structure and historically has been very slow (though my understanding is that Lucee actually fixes that somewhat). The "brilliant" parts are less obvious but still cool. For example the cfquery blocks are really neat, and I say that without any sarcasm. Not only does it make it easy to write SQL directly, but there are nice built-in features to avoid injections with cfqueryparam that are easy to use, and you can simply add an attribute to the cfquery to specify caching. That's actually a really cool; I've seen people haphazardly reinvent different SQL caching heuristics and screw them up. The cfquery stuff makes it trivial and it has the advantage of doing it correctly.
Things like that are all over the language (though I haven't used it in awhile so I'd have to dig through notes to find specific examples); pages and pages of ugliness mixed with occasional spots of cleverness.
While I don't want to say I "miss" writing it, because I don't, I do have a bit of gratitude for its existence. If I hadn't picked up ColdFusion because of an, umm, "alternatively licensed" version of Dreamweaver when I was a teenager, my career would likely be very very different.
Care to share a link or some more info?
How it works:
* CF worker on a subdomain that handles POST requests. Basically, a JS function that handles incoming requests.
* It stores comments in CF KV and sends me a copy to telegram
* All I need to do is copy it to Markdown (can be automated, but I manually approve the comments in case of spam)
* In Markdown, I'm using frontmatter to store arbitrary JSON data
* To avoid automated spam, I have a few tricks: do not expose the submit URL in HTML (insert it via JS) and calculate a simple checksum so that automated software that does not execute JS won't be able to post. Such software usually targets Wordpress blogs by scraping them from Google. I get zero spam from it.
Everything, including hosting and workers, costs me zero.
Example: https://rushter.com/blog/zsh-shell/
>Everything, including hosting and workers, costs me zero.
Your setup sounds cool. Do you host it on a home lab or something?
2 replies →
Interesting, thanks!