Site Maintenance Log & Fix Guide

Last Updated: 2025-12-31

Changelog

Template for future entries:

Setup

Before running any commands, set the $WORKSPACE_ROOT variable in PowerShell:

# Set to your repo root directory
$WORKSPACE_ROOT = "C:\path\to\your\repo"  # or use $(Get-Location) if already in repo root

All commands below use $WORKSPACE_ROOT instead of full paths for privacy and portability.


Purpose


Recent Fixes


1) Emoji/Mojibake Repair

# Ensure venv is active for the repo (already configured)
& "$WORKSPACE_ROOT/.venv/Scripts/python.exe" -m pip install ftfy

# Run the repair script from repo root
& "$WORKSPACE_ROOT/.venv/Scripts/python.exe" -u fix_emojis.py
# Quick grep-like scan (pattern often seen in mojibake)
Select-String -Path learning/**/*.md -Pattern "ðŸ|ï¸" -AllMatches

2) External Links Open in New Tabs

$basePath = "$WORKSPACE_ROOT/learning"
$files = Get-ChildItem -Path $basePath -Filter "*.md" -Recurse
foreach ($file in $files) {
  $content = Get-Content -Path $file.FullName -Raw
  $pattern = '\[([^\]]+)\]\((https?://[^)]+)\)(?!\{:target)'
  $updated = [regex]::Replace($content, $pattern, {
    param($m)
    "[{0}]({1}){:target=\"_blank\" rel=\"noopener noreferrer\"}" -f $m.Groups[1].Value, $m.Groups[2].Value
  })
  if ($updated -ne $content) { Set-Content -Path $file.FullName -Value $updated }
}

3) Icon Path Cleanup


4) Baseurl-Safe Internal Links


5) Homepage & Footer Enhancements


6) Documentation & Guidance


7) Targeted Page Fixes


Validation Checklist


How To Add Future Entries


Quick Commands

jekyll serve --livereload
& "$WORKSPACE_ROOT/.venv/Scripts/python.exe" -u fix_emojis.py

Notes


Helper Script: Append Changelog Entry

# Dry-run (prints proposed changes without writing)
& "$WORKSPACE_ROOT/.venv/Scripts/python.exe" scripts/add_changelog_entry.py --dry-run --item "Your change summary" --item "Another bullet"

# Write to file with today's date
& "$WORKSPACE_ROOT/.venv/Scripts/python.exe" scripts/add_changelog_entry.py --item "Updated footer styles" --item "Normalized image paths"

# Specify custom date
& "$WORKSPACE_ROOT/.venv/Scripts/python.exe" scripts/add_changelog_entry.py --date 2025-12-28 --item "Refactored navigation JS" --item "Added new blog post"

Pre-Commit Validation

& "$WORKSPACE_ROOT/.venv/Scripts/python.exe" scripts/validate_site.py