Technical Blog - GitHub Pages Setup Instructions
Technical Blog - GitHub Pages Setup Instructions
Prerequisites
- GitHub repository with GitHub Pages enabled
- Domain name (optional, but recommended for professional blog)
GitHub Pages Setup
1. Repository Configuration
- Go to your repository settings on GitHub
- Navigate to “Pages” section
- Set source to “Deploy from a branch”
- Select branch:
main(ormaster) - Select folder:
/ (root)
2. Custom Domain Setup (Optional)
- Add a
CNAMEfile to your repository root - Add your domain name to the CNAME file
- Configure DNS at your domain provider:
- For apex domain: Create A records pointing to GitHub’s IP addresses
- For subdomain: Create CNAME record pointing to
yourusername.github.io
3. GitHub Pages IP Addresses
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
4. DNS Configuration Examples
For Apex Domain (yourdomain.com)
Type: A
Name: @
Value: 185.199.108.153
Type: A
Name: @
Value: 185.199.109.153
Type: A
Name: @
Value: 185.199.110.153
Type: A
Name: @
Value: 185.199.111.153
Type: CNAME
Name: www
Value: yourusername.github.io
For Subdomain (blog.yourdomain.com)
Type: CNAME
Name: blog
Value: yourusername.github.io
Local Development Setup
1. Install Ruby and Jekyll
# On Windows (using RubyInstaller)
# Download from https://rubyinstaller.org/
# On macOS (using Homebrew)
brew install ruby
gem install jekyll bundler
# On Ubuntu/Debian
sudo apt-get install ruby-full build-essential zlib1g-dev
gem install jekyll bundler
2. Install Dependencies
cd your-blog-directory
bundle install
3. Run Local Server
bundle exec jekyll serve
# or with drafts
bundle exec jekyll serve --drafts
Your site will be available at http://localhost:4000
Customization Guide
Update Site Configuration
Edit _config.yml:
- Update
title,description,url - Add your social media handles
- Modify categories as needed
Add Your Information
Edit about.markdown:
- Add your bio and background
- Update social media links
- Add your photo
Create New Posts
- Create files in
_postsdirectory - Use naming convention:
YYYY-MM-DD-title.md - Include proper front matter:
--- layout: post title: "Your Post Title" date: YYYY-MM-DD HH:MM:SS -0000 categories: [category-name] tags: [tag1, tag2, tag3] author: "Your Name" excerpt: "Brief description of your post" ---
Available Categories
homelab- Homelab Automationcloud-azure- Cloud Technologies - Azurecloud-aws- Cloud Technologies - AWSai-ml- AI & Machine Learningdevops- DevOps & Infrastructureprogramming- Programming & Development
Content Guidelines
Writing Tips
- Use clear, descriptive titles
- Include code examples where relevant
- Add screenshots and diagrams
- Include relevant tags for better organization
- Write engaging excerpts
SEO Best Practices
- Use descriptive permalinks
- Include meta descriptions
- Optimize images with alt text
- Link to related posts
- Use proper heading structure
Code Syntax Highlighting
Supported languages include:
bash,shell,powershellpython,javascript,typescriptyaml,json,xmlsql,dockerfile- And many more…
Publishing Workflow
1. Write locally
bundle exec jekyll serve --drafts
2. Test thoroughly
- Check all links work
- Verify code examples
- Test responsive design
3. Commit and push
git add .
git commit -m "Add new post: Your Post Title"
git push origin main
4. Verify deployment
- Check GitHub Actions for successful build
- Visit live site to confirm changes
Troubleshooting
Common Issues
- Build failures: Check GitHub Actions logs
- CSS not loading: Verify
main.scssexists inassets/css/ - Domain not working: Check DNS propagation (can take 24-48 hours)
- 404 errors: Ensure file paths match exactly
Useful Commands
# Check Jekyll version
bundle exec jekyll --version
# Build site without serving
bundle exec jekyll build
# Clean build files
bundle exec jekyll clean
# Check for broken links
bundle exec jekyll doctor