Posted by jonutah 1 day ago
While their documentation(https://jekyllrb.com/docs/) is one of the best resources to learn, I have found my job much more straightforward using one of the pre-built themes that is available on the internet. With deployment to github pages almost instantaneous, I can see myself updating the blog much more often.
The blog which I am currently working on: https://jagadeeshposni.github.io The theme I have used: minimal mistakes
Also Cloudflare KV provides a simple dashboard interface for adding and removing KV entries: https://gist.github.com/simonw/1e072d04960616970381a433bfca7...
I suggest we instead treat this post as if the title was "Show HN: a simple text blog demonstrating how to use Cloudflare workers and KV store" - that way we get to have a more interesting conversation.
(Submitted title was 'Show HN: Simple Text Blog")
It's literally a single file with 80 lines of code. At this point the only thing easier is a linux one-liner to serve a file directory over HTTP.
Like, has anyone ever used Jekyll, Hugo, Ghost, Jr, Wordpress or any other blog system? None of them are anything close to 80 lines of code.
I like Jon's example here, a single and fairly short file that does just enough to demo this all, nice.
I built this little service to add UK specific political location data to Action Network CRM. 300 lines for the actual service!
code here: https://github.com/jms301/ANUpdaterUK/blob/main/src/index.js
Sure it's only taking a webhook, reading an API, looking up a db entry and then updating via API.
But just knowing it's running on someone else's infra and there's so little code to validate is very comforting.
Prior to this I had a version running on a VPS and yeah I can do it. But you end up with a LOT of code / config to run the web server, the queue, the database... And any of that could be introducing bugs and security problems.
But the maximum DB size is 10GB (https://developers.cloudflare.com/d1/platform/limits/).
Really?
I am sure there is a free-tier, but if we skip that and pretend we are paying for it from the beginning.
How would much 100.000 hits be?
I presume it would be a tiny number, A esp given the current content in the blog. so lets imagine some photos and heavier content.
How difficult would it be to extend with with CF CDN?
The subscription is 5 USD a month, including 10M hits at 30ms each, 10M w, 1M r, 1M d, 1M l, and also 1GB.
One of the examples in their page (for a fully dynamic website, which is worst case) is: Subscription $5.00
Requests $1.50 (15,000,000 requests - 10,000,000 included requests) / 1,000,000 * $0.30
CPU time $1.50 ((7 ms per request * 15,000,000) - 30,000,000 included CPU ms) / 1,000,000 * $0.02
Total $8.00
Now we need the equivalent thing for Durable Objects! Maybe a chat room, hm.