Subscribe

Hosting a Static Blog on Netlify

✍️

How to host a Static Website on Netlify

21 Apr, 2020 · 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!

Want to learn how to add a page to this blog?

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

Spread the knowledge with fellow developers on Twitter
Tweet this tip
Powered by Webmentions - Learn more

Read next 📖

Eleventy creating a static JavaScript search

19 Jun, 2021 · 4 min read

Eleventy creating a static JavaScript search

Eleventy JSON endpoint with posts

18 Jun, 2021 · 2 min read

Eleventy JSON endpoint with posts

Join 2099 devs and subscribe to my newsletter