Skip to main content

Theme Social Button URL Fixes

Overview

Fixed social sharing buttons in the zer0-mistakes theme to use production URLs instead of localhost URLs, resolving 353 unique broken URLs across the it-journey site.

Problem

Social sharing buttons were using Jekyll’s absolute_url filter, which resolves to localhost in development environments:

This caused link health checks to report 353 broken URLs for social sharing buttons.

Solution

Files Modified

1. _includes/content/intro.html

Before:

https%3A%2F%2Fit-journey.dev%2Flink-check-results%2FTHEME_FIXES%2F
https://it-journey.dev/link-check-results/THEME_FIXES/

After:

https%3A%2F%2Fit-journey.dev%2Flink-check-results%2FTHEME_FIXES%2F
https://it-journey.dev/link-check-results/THEME_FIXES/

Changed Buttons:

2. _layouts/notebook.html

Before:

https://it-journey.dev/link-check-results/THEME_FIXES/

After:

https://it-journey.dev/link-check-results/THEME_FIXES/

Changed Buttons:

Pull Request

Repository: bamr87/zer0-mistakes
Branch: fix/social-button-urls
PR: https://github.com/bamr87/zer0-mistakes/pull/15
Commit: 866e26b

Impact

Technical Benefits

Testing

Verification Steps

  1. Build Jekyll site: bundle exec jekyll build
  2. Check built HTML in _site/ for social button URLs
  3. Verify URLs use https://it-journey.dev/ instead of http://0.0.0.0:4002/
  4. Test social buttons in browser (dev and production)

Expected Results

Deployment

Theme Update Process

  1. Merge PR #15 in zer0-mistakes repository
  2. Tag new theme release (recommended)
  3. it-journey will automatically pick up changes (uses remote theme)
  4. Verify theme update: bundle update in it-journey repo
  5. Rebuild site and re-run link health check

Before Theme Fix:

After Theme Fix (Expected):

Future Improvements

  1. Add CI/CD Check: Validate social button URLs in theme tests
  2. Template Linting: Catch absolute_url usage in share buttons
  3. Documentation: Update theme docs with URL generation best practices
  4. Other Layouts: Review other theme layouts for similar issues

Version: 1.0
Date: 2025-12-12
Author: bamr87
Status: Complete (PR created, awaiting merge)