Hosting a Static Blog on Netlify

Hosting a Static Blog on Netlify

Β·

2 min read

In Yesterday's post, we learned how to create a static blog with eleventy, but having a blog local doesn't really bring us much fun, does it?

To give you some recap Netlify is an awesome static host. There are about a million more options, but I like to explore Netlify today since that is what I am using.

And the best of all they offer a free tier, see more on their pricing page.

So let's see how we can host our created blog on Netlify.

Deploying our Static blog with Netlify

Creating an account on Netlify

Head over to Netlify Signup and log in using your preferred method of authentication.

I am using GitHub because my project is on GitHub.

Creating a new site on Netlify

Once we set up and created our account on Netlify we can go ahead and add a new site from Git.

This way, our website can incorporate automatic deployments later on.

I'm choosing GitHub here as an option; it will now ask you to authenticate with GitHub and asks you which repository you would like to use. Let's choose the blog we created yesterday.

Netlify build settings

Netlify is amazing enough to help us get started to it will help us set a build command:

npx eleventy

And set the Publish directory to be _site for our project.

Now click Deploy site and wait a couple of seconds.

Netlify extra's

Netlify comes with some amazing options

Viewing our deployed website

Once the project is deployed, click and visit your website.

See our website here!

Auto deployment

Because we linked Netlify to our GitHub project every time we publish to the Master branch, we will automatically deploy to Netlify, isn't that just great? πŸ”₯

Thank you for reading, and let's connect!

Thank you for reading my blog, feel free to subscribe to my email newsletter and connect on Facebook or Twitter

Did you find this article valuable?

Support Daily Dev Tips by becoming a sponsor. Any amount is appreciated!