GitHub Pages is a free hosting service that's perfect for Postalgic blogs. It serves static websites directly from your GitHub repository, making it an ideal match for the static sites that Postalgic generates.
Why GitHub Pages?
• Completely free hosting
• Custom domain support
• HTTPS included
• Git-based deployment
• Excellent uptime and performance
• Completely free hosting
• Custom domain support
• HTTPS included
• Git-based deployment
• Excellent uptime and performance
Prerequisites
Before starting, make sure you have:
- A GitHub account (free)
- The Postalgic iOS app with a configured blog
- Git configured for publishing in Postalgic (we'll set this up)
Step-by-Step Setup
1
Create a GitHub Repository
- Go to GitHub.com and sign in
- Click the "New" button or "+" icon to create a new repository
- Name your repository (e.g.,
my-blog
oryour-username.github.io
) - Make sure it's set to Public
- Check "Add a README file"
- Click "Create repository"
Tip: If you name your repository
your-username.github.io
, your blog will be available at https://your-username.github.io
directly.
2
Enable GitHub Pages
- In your new repository, click on "Settings" (in the top navigation)
- Scroll down to "Pages" in the left sidebar
- Under "Source", select "Deploy from a branch"
- Choose "main" as the branch
- Select "/ (root)" as the folder
- Click "Save"
GitHub will show you the URL where your site will be published (e.g., https://your-username.github.io/my-blog
).
3
Create a Personal Access Token
Postalgic needs permission to push to your repository:
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click "Generate new token" → "Generate new token (classic)"
- Add a note like "Postalgic Blog Publishing"
- Set expiration (recommend 1 year or no expiration)
- Check the "repo" scope (this gives full repository access)
- Click "Generate token"
- Copy the token immediately - you won't see it again!
Important: Store your token securely. You'll need it to configure Postalgic.
4
Configure Git Publishing in Postalgic
- Open the Postalgic iOS app
- Go to your blog and tap "Publish"
- Select "Git" as your publishing method
- Fill in the configuration:
Git Configuration Settings:
- Repository URL:
https://github.com/your-username/your-repo-name.git
- Username: Your GitHub username
- Password/Token: The personal access token you created
- Branch:
main
5
Configure Your Blog URL
Set your blog's URL to match your GitHub Pages site:
- In Postalgic, go to Blog Settings
- Update the "Blog URL" field with your GitHub Pages URL
- For example:
https://your-username.github.io/my-blog
- This ensures links in your RSS feed and site navigation work correctly
6
Publish Your First Post
- Create a test post in Postalgic
- Go to the Publish screen
- Tap "Publish Blog"
- Postalgic will generate your static site and push it to GitHub
- Wait a few minutes for GitHub Pages to build and deploy
- Visit your GitHub Pages URL to see your live blog!
Custom Domain Setup (Optional)
You can use your own domain name instead of the GitHub Pages subdomain:
DNS Configuration
- In your domain registrar's DNS settings, create a CNAME record
- Point your domain (e.g.,
blog.example.com
) toyour-username.github.io
- For apex domains (e.g.,
example.com
), create A records pointing to:185.199.108.153 185.199.109.153 185.199.110.153 185.199.111.153
GitHub Configuration
- In your repository, go to Settings → Pages
- Under "Custom domain", enter your domain
- Check "Enforce HTTPS" (after DNS propagates)
- GitHub will create a CNAME file in your repository
Note: DNS changes can take up to 24 hours to propagate globally.
Troubleshooting
Common Issues
Authentication Failed
- Double-check your GitHub username and personal access token
- Ensure the token has "repo" scope permissions
- Verify the repository URL is correct
Site Not Updating
- GitHub Pages can take a few minutes to update after each push
- Check the "Actions" tab in your repository for build status
- Clear your browser cache if changes don't appear
404 Page Not Found
- Ensure GitHub Pages is enabled and pointing to the correct branch
- Verify your blog URL in Postalgic matches your GitHub Pages URL
- Check that your repository is public
HTTPS Issues with Custom Domain
- Wait for DNS propagation (up to 24 hours)
- Disable and re-enable "Enforce HTTPS" in repository settings
- Ensure your CNAME record points to
username.github.io
, not the full repository URL
Benefits of GitHub Pages Hosting
- Version Control: Every change to your blog is tracked in Git
- Backup: Your entire blog is safely stored in GitHub
- Collaboration: Others can contribute to your blog via pull requests
- Performance: GitHub's CDN ensures fast loading worldwide
- Security: Static sites are inherently secure with HTTPS included
- Cost: Completely free for public repositories
Perfect Match: GitHub Pages is specifically designed for static sites, making it an ideal hosting solution for Postalgic blogs.
Next Steps
Once your blog is live on GitHub Pages:
- Customize your blog's appearance using Postalgic's templating system
- Learn about markdown formatting for rich content
- Set up analytics (Google Analytics, Plausible, etc.) by editing your theme templates
- Share your RSS feed URL so others can follow your blog
- Consider setting up a custom domain for a more professional appearance