DEV Community

Tiny
Tiny

Posted on • Originally published at tinygame.dev on

Easy blogging

I've got a great blog, where do I host it?

Well, you don't need to host it, you can use dev.to, obviously! But let's say you like to tinker and do want to maintain your own blog.

If you’re a dev, or a bit techy and don’t mind getting your hands dirty, there’s a nice and quick way to set up a blog deployment system with GitHub and Cloudfare. It’s simple, free, and relatively quick. There’s better ways to get a blog out there if you want simplicity, but I’ve found doing it this way to be more fulfilling.

We’re only talking about deploying the blog here, so I’m assuming you have a way to build the content already. My own blog, for example, uses the terrific Astro framework.

First step, once you have your blog code set up and you can create your posts, is to chuck everything onto GitHub. With the repo ready to go, create a project in Cloudflare Pages and connect to Git. Get the GitHub and Cloudflare accounts connected, make sure the Cloudflare app on GitHub has permission to see your blog repo, and select it in your Pages project. Lastly, set up the build settings for your project if relevant (e.g. npm run build for the build command and select the destination folder).

That’s basically it. All you need to do now is create your blog posts and push to GitHub. The Cloudflare app will sync, build, and deploy the new content for each commit.

Top comments (0)