How Do I Set Up a GitHub Repo for a Jekyll Blog as a Beginner
Why Do I Need a GitHub Repository for My Jekyll Blog?
Before anything else, it's important to understand why you need a GitHub repository at all. Jekyll is a static site generator that transforms markdown files into a complete website, and GitHub Pages is a free hosting service that can build and serve your Jekyll site directly from a GitHub repository.
This means your entire blog — including layouts, content, and theme — is version-controlled and publicly hosted through GitHub. It’s ideal for developers, marketers, and content creators who want full control over their blog without paying for hosting.
What Are the Basic Requirements Before Starting?
To follow along, here’s what you need:
- A free GitHub account.
- Basic familiarity with using a browser and copy-pasting commands.
- The Mediumish Jekyll theme source files. You can find free versions on GitHub or purchase a licensed version.
How Do I Create a GitHub Repository for My Blog?
Step 1: Sign in and Create a New Repository
Go to GitHub.com, log in, and click the "+" icon in the top-right corner. Select “New repository.”
Choose a short, meaningful name for your blog, such as my-jekyll-blog or mediumish-site. You can make it public or private. Leave “Initialize this repository with a README” unchecked for now. Click “Create repository.”
Step 2: Clone Your Repository Locally
If you’re working on your local machine, open your terminal and clone the repository:
git clone https://github.com/your-username/your-repo-name.git
Replace “your-username” and “your-repo-name” with your GitHub details.
Step 3: Add the Jekyll Mediumish Theme Files
Copy all the Mediumish theme files into your cloned repository folder. This includes:
_layouts,_includes,_posts,_data- Configuration files like
_config.yml - CSS, JS, and image folders
Make sure you preserve the file structure to avoid errors during build.
Step 4: Commit and Push Changes to GitHub
Use the following commands in your terminal to commit the files to your repository:
cd your-repo-name
git add .
git commit -m "Initial commit with Mediumish theme"
git push origin main
Which Branch Should I Use for GitHub Pages?
GitHub Pages allows deployment from either the main branch or a special gh-pages branch, depending on your setup.
Option 1: Use Main Branch (Recommended for Jekyll)
If your repository is named your-username.github.io, GitHub will automatically publish the site from the main branch.
Option 2: Use a Separate Branch
If your repository is not a user or org site, go to Settings > Pages and select the branch and folder you want to deploy from (typically main and / (root)).
How Do I Enable GitHub Pages?
Once your content is pushed, enable GitHub Pages:
- Go to your repo’s Settings.
- Scroll down to the “Pages” section.
- Under “Source,” choose the correct branch and folder.
- Click Save. GitHub will display a link to your live site.
Wait a few minutes and visit the URL. You should see the Mediumish theme with placeholder content.
How Do I Test and Edit the Blog Locally?
To test the blog on your machine:
gem install bundler jekyll
bundle install
bundle exec jekyll serve
Then visit localhost:4000 to see your blog. This helps you preview changes before pushing them online.
What Should I Edit First in My Mediumish Jekyll Blog?
Focus on the following files to personalize your site:
_config.yml– for site title, description, and author info._data/settings.yml– handles theme appearance._posts/– add or edit blog posts using the YYYY-MM-DD-title.md format.
How Can I Avoid Common Beginner Mistakes?
Do Not Edit Files Directly in GitHub (If Not Confident)
While GitHub's online editor is handy, beginners should work locally to reduce mistakes.
Always Check Build Output
Visit your GitHub repo’s “Actions” tab or “Pages” section to diagnose errors if your site doesn’t show up.
Use Minimal Plugins
Stick to the plugins supported by GitHub Pages, like jekyll-feed, jekyll-seo-tag, and jekyll-sitemap. Avoid unsupported plugins unless using GitHub Actions or external CI/CD.
What Are the Next Steps After Setup?
Once the basic repository and theme are working:
- Write a few posts to test layout and formatting.
- Customize design via
_sassor CSS files. - Connect a custom domain via DNS settings if needed.
- Consider adding analytics (e.g., Google Analytics or Plausible).
Can I Collaborate with Others on My Blog?
Yes, GitHub makes collaboration easy. You can:
- Add collaborators from the “Settings > Collaborators” tab.
- Use pull requests to review and merge changes.
This is perfect for teams or multi-author blogs.
What If I Don’t Know Git or the Command Line?
No problem. You can use GitHub Desktop or Codespaces to manage your blog without using the terminal. These tools offer point-and-click interfaces for pushing changes and managing content.
Conclusion
Setting up a GitHub repository for your Jekyll Mediumish blog might seem intimidating at first, but it becomes straightforward once you understand the core process. As a beginner, focus on creating a clean repo, correctly uploading theme files, and enabling GitHub Pages.
With patience and practice, you’ll soon have a fast, elegant, and free blog running on one of the most developer-friendly platforms out there.