I have been working on something similar this morning. I want to create a simple blog to document my thoughts without having to deal much about technical stuff and maintenance and spend a few hours diving the rabbit hole of jekyll blogs.
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.
Minimal mistakes is a great theme. I had almost decided on minimal mistakes when I wanted to upgrade my blog from a simple two column Hyde theme. But then I wrote the template from scratch using bootstrap-5 as I felt that gave me more control and I took it as opportunity to develop my frontend skills. Here is my blog:
Same happened to me with Astro. Yes, it’s much more involved initially because you have to set up the entire layout, but after that, adding content only pages is just writing Markdown. And for the layout, with the help of Tailwind and TailwindUI, it’s pretty easy for a non-designer.
I tried this out and found it useful for exploring Cloudflare workers. One thing I learned: KV and durable objects are not the same thing. KV is eventually consistent, durable objects is the thing where all traffic has to be routed to the same node since it's dealing with a read/write store that has read-after-write guarantees.
Thought this was really cool, so I reimplemented[0] it in Val Town[1] using their blob storage[2]. Mine's a bit longer because of I got a little more elaborate but it was a fun exercise.
6 comments already complaining that this isn't "simple".
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.
I think what would be amazing is if WhatsApp creates a mobile number based website which anyone can access if they know the mobile number. Access through whatsapp mobile app.
This is nice, apart from a quick play when they were new I've never really looked at CF Workers and KV again. This made me go and have a look at the docs and find that it's actually looks quite useful. I didn't know they'd added Python and other languages, so that's cool in itself.
I like Jon's example here, a single and fairly short file that does just enough to demo this all, nice.
I'm building a blog directory/reader/search engine [1] on Cloudflare Workers with D1 as the main database. Very pleased with the ecosystem, including Queues and scheduled jobs. DB migrations are simple, local development is a breeze (scheduled jobs don't work though, but there's a simple workaround), and the DB is an SQLite implementation. I am worried about vendor lock in, but as long as I keep the app relatively straight-forward, it shouldn't be a huge deal to migrate to some other Node or Deno backend.
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.
This is great, thanks! It's always useful to see these "here's how to do something useful with a new technology" demos, and I've been wondering how Cloudflare's offerings work exactly, so thanks!
Now we need the equivalent thing for Durable Objects! Maybe a chat room, hm.
I like it but not that enthusiastic about JavaScript echoing html. What about having simple html templates that call back to the worker for the posts and the worker return json?
Yeah it is gross interweaving html fragments randomly but I wanted to see if I could do it and keep it all constrained to one file. Thanks for the feedback.
it's far from simple, because you need to use several technologies at once, why not do it so that you can just copy it to the hosting and it will work right away? especially since it's a microblog
Simple would be if you would just write text files, drop it somewhere simple, either a webserver or GitHub pages or some hosted service, and be done with it.
I know, I know.
He's probably unemployed at the moment or just brushing off before the next interview.
But the problem is that this is symptomatic for the JS community.
It's silly when someone needs Next for a blogging platform he'll be posting three times a year, but the same thing is happening in the office, everyday.
It's quite a smear to write "He's probably unemployed at the moment or just brushing off before the next interview.". Cheap smears are a form of casual dismissal and devalue this site.
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