Publish Your Blog with Netlify
I'll guide you through creating a blog using a Static Site Generator (SSG), hosting the code on GitHub, and deploying it live to the world with Netlify.
This method is incredibly popular because it's secure, extremely fast, and largely free.
The Big Picture: How It Works
- Design & Content (Locally): You'll use a pre-built blog template (based on a Static Site Generator) to avoid designing from scratch. You will write your blog posts in simple text files using Markdown.
- Source Control (GitHub): You'll store all your blog's files (content, themes, configuration) in a repository on your GitHub account. This acts as the single source of truth for your blog.
- Build & Deploy (Netlify): You'll connect your GitHub repository to Netlify. Whenever you add a new post or make a change and push it to GitHub, Netlify will automatically "build" your blog (convert your Markdown files into a static HTML website) and publish it to its global network.
Step 1: Choose a Blog Starter and Set It Up on GitHub
The easiest way to start is to use a starter template. I'll recommend using Eleventy, a modern and flexible SSG that is very easy to learn. We'll use a popular starter template called eleventy-base-blog
.
-
Create Your Blog Repository on GitHub:
- Go to the
eleventy-base-blog
template page on GitHub: https://github.com/11ty/eleventy-base-blog. - Click the green "Use this template" button and then select "Create a new repository".
- Give your repository a name. Something like
my-personal-blog
is perfect. - Keep it Public and click "Create repository".
You now have your own copy of a fully functional blog in your GitHub account!
- Go to the
-
Clone The Repository Locally (Optional, but Recommended): To customize the blog and write posts, you'll want to have the files on your computer.
- On your new repository's page on GitHub, click the green
< > Code
button. - Copy the HTTPS or SSH URL.
- Open a terminal or command prompt on your computer and run:
git clone [the_url_you_copied]
- This will download your blog's files into a new folder. Navigate into it:
cd [repository-name]
- On your new repository's page on GitHub, click the green
-
Customize Your Blog's Details:
- Open the project in your favorite code editor (like VS Code).
- Find and open the file
_data/metadata.json
. - Edit the
title
,url
,description
, andauthor
fields. This will update the main details across your blog.
{ "title": "My Awesome New Blog", "url": "https://example.com/", // You'll change this later to your Netlify URL "language": "en", "description": "I am writing about my experiences as a new developer.", "author": { "name": "Your Name Here", "email": "you@example.com", "url": "https://example.com/about-me/" } }
-
Write Your First Post:
- Go into the
posts
folder. - You can delete the existing
.md
files or edit them. - To create a new post, simply create a new file with a
.md
extension (e.g.,my-first-post.md
). - The content is written in Markdown. The section at the very top between
---
is called "front matter" and contains metadata for the post.
Example
my-first-post.md
:--- title: My First Post! description: "This is the first post on my new blog. How exciting." date: 2025-07-15 tags: - intro - learning --- ## Welcome to My Blog This is the beginning of my journey. I created this blog using Eleventy and Netlify. * It's fast * It's secure * It was easy to set up!
- Go into the
-
Push Your Changes to GitHub:
- If you made these changes locally, you need to save them back to GitHub.
- In your terminal, run the following commands:
git add . git commit -m "Initial blog setup and first post" git push origin main
Your blog's source code is now set up and customized on GitHub. Now for the magic part!
Step 2: Publish Your Blog with Netlify
-
Sign Up for Netlify:
- Go to app.netlify.com and click "Sign up".
- The easiest way is to sign up using your GitHub account. Authorize Netlify to access your repositories when prompted.
-
Import Your Project:
- From your Netlify dashboard, click "Add new site" and choose "Import an existing project".
- Select GitHub as your Git provider.
- Netlify will show you a list of your GitHub repositories. Find your blog repository (
my-personal-blog
or whatever you named it) and select it.
-
Configure Build Settings:
- Netlify is very smart and will likely detect that you're using Eleventy and configure everything for you automatically.
- You should see the following settings pre-filled. If not, you can set them manually:
- Branch to deploy:
main
(ormaster
) - Build command:
npx @11ty/eleventy
- Publish directory:
_site
- Branch to deploy:
These settings tell Netlify: "When you see an update, run the Eleventy command to build the site, and then publish the contents of the
_site
folder." -
Deploy Your Site:
- Click the "Deploy site" button.
- Netlify will start the deployment process. It will pull your code from GitHub, run the build command, and deploy the results. You can watch the progress in the deployment logs.
- This first deploy might take a minute or two.
-
You're Live! Get Your Production Link:
- Once the deployment is finished, you'll see a "Published" status.
- Netlify will provide you with a random URL for your site, like
shimmering-pegasus-12345.netlify.app
. You can see this at the top of your site's dashboard in Netlify. - Click that link! Your blog is now live on the internet!
You can easily change this random URL to something more memorable.
- Go to Site settings -> Domain management.
- Under "Domains", click Options next to your current URL and select Edit site name.
- Change it to something unique, like
my-awesome-new-blog.netlify.app
.
Your New Workflow
Congratulations! You have a fully automated blog. Your workflow for adding new posts is now incredibly simple:
- Create a new
.md
file in theposts
folder on your local machine. - Write your content.
- Commit and push the changes to GitHub.
git add . git commit -m "Added new blog post about XYZ" git push
- That's it! Netlify will see the update, automatically rebuild your site with the new post, and publish it. Your live site will be updated in a minute or two.
Section Header
Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.
Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line.
- ← Previous
Cómo alojar un jardín digital en Netlify - Next →
Es mi primer post.