Skip to main content

GitHub Pages Hosting

The site is hosted on GitHub Pages using a username.github.io repository pattern, which provides automatic deployment and free hosting.

Repository Configuration

Repository Name: rdotsvg.github.io
GitHub Pages recognizes [username].github.io repositories as special user sites:
  • Automatically deployed from the main branch
  • No manual workflow configuration needed
  • Served from repository root (not /docs folder)
  • Custom domain support built-in
Regular project repositories require manual Pages configuration.

Deployment Workflow

1

Push to Main Branch

Any commit pushed to the main branch automatically triggers deployment:
git add .
git commit -m "Update homepage content"
git push origin main
2

GitHub Pages Build

GitHub automatically:
  • Detects changes in the repository
  • Serves static files from root directory
  • Updates live site within 1-2 minutes
  • No build process or compilation needed
3

DNS Propagation

Custom domain changes may take longer:
  • CNAME file changes: Instant
  • DNS record updates: 5-60 minutes
  • Full propagation: Up to 48 hours

Custom Domain Setup

The site uses a custom domain (r.foo.ng) instead of the default rdotsvg.github.io URL.

CNAME Configuration

CNAME file in repository root:
r.foo.ng
The CNAME file must contain ONLY the domain name with no protocol (no https://) or trailing slash.

DNS Configuration

Configure DNS records at your domain registrar (foo.ng):
For subdomain r.foo.ng:
TypeNameValueTTL
CNAMErrdotsvg.github.io.3600
Note the trailing dot in rdotsvg.github.io. - some DNS providers require it.

HTTPS/SSL

GitHub Pages automatically provisions SSL certificates:
  1. Add CNAME file to repository
  2. Configure DNS records
  3. Go to repository Settings → Pages
  4. Check “Enforce HTTPS” (after DNS propagates)
HTTPS enforcement may fail if DNS hasn’t fully propagated. Wait 10-15 minutes before enabling.

SEO Configuration

The site uses robots.txt to control bot access and prevent AI training scrapers.

robots.txt Implementation

User-agent: CCBot
Disallow: /

User-agent: ChatGPT-User
Disallow: /

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: cohere-ai
Disallow: /

User-agent: PerplexityBot
Disallow: /
Blocked User-Agents:
  • AI training crawlers (GPTBot, ClaudeBot, cohere-ai)
  • AI assistant tools (ChatGPT-User, PerplexityBot)
  • Data aggregators (Diffbot, Omgilibot, FacebookBot)
  • Extended search bots (Google-Extended, Applebot-Extended)
Allowed User-Agents:
  • Standard search engines (Googlebot, Bingbot)
  • Social media preview crawlers (Twitter, Discord)
  • Analytics and monitoring tools

Accessing robots.txt

The file is served at the root URL:
https://r.foo.ng/robots.txt
robots.txt is advisory only. Malicious bots may ignore it. Consider additional protection like Cloudflare for strict enforcement.

Git Workflow

Branch Strategy

Single Branch Deployment:
  • Main branch: main (production)
  • All changes committed directly to main
  • No separate development or staging branches
Ideal for personal sites with single maintainer:
# Make changes
git add index.html
git commit -m "Update bio section"
git push origin main

# Site updates automatically

Deployment Checklist

1

Local Testing

Test changes locally before deploying:
# Option 1: Python simple server
python3 -m http.server 8000

# Option 2: Node.js http-server
npx http-server -p 8000

# Visit http://localhost:8000
2

Validate Files

Check critical files exist:
  • index.html in root
  • styles.css referenced correctly
  • CNAME contains correct domain
  • robots.txt has proper formatting
3

Commit and Push

Deploy to production:
git add .
git commit -m "Descriptive commit message"
git push origin main
4

Verify Deployment

Check the live site:
  • Visit https://r.foo.ng
  • Test in multiple browsers
  • Verify mobile responsiveness
  • Check Status.cafe widget loads

CDN Usage

The site leverages CDNs for external resources to improve performance and reduce repository size.

jsdelivr CDN

ServerMono Font Loading:
@font-face {
  font-family: 'ServerMono';
  src: url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono@latest/public/fonts/ServerMono-Regular.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono@latest/public/fonts/ServerMono-Regular.woff') format('woff'),
       url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono@latest/public/fonts/ServerMono-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
Benefits:
  • Free CDN with global edge locations
  • GitHub repository direct linking
  • Automatic version management with @latest tag
  • HTTP/2 support for faster loading
  • No account or API keys required
Format fallback chain:
  1. WOFF2 (best compression, modern browsers)
  2. WOFF (good compression, wide support)
  3. OTF (universal compatibility)

External Scripts

Status.cafe Widget:
<script src="https://status.cafe/current-status.js?name=raster" defer></script>
zero-md (Links page):
<script type="module" src="https://cdn.jsdelivr.net/npm/zero-md@3?register"></script>
Using defer or type="module" prevents scripts from blocking page rendering.

Performance Optimization

File Size Strategy

  • HTML: Minified inline styles removed in favor of external CSS
  • CSS: Single 2KB stylesheet for entire site
  • Fonts: WOFF2 format reduces font size by ~30% vs TTF
  • SVG: Optimized logo with minimal path data

Caching Headers

GitHub Pages automatically sets cache headers:
Cache-Control: max-age=600
File TypeCache TimeRationale
HTML10 minutesFrequent updates
CSS10 minutesStyle iterations
Fonts1 yearRarely change
Images1 yearStatic assets

Troubleshooting

Possible causes:
  1. Browser cache - Hard refresh with Ctrl+Shift+R (Cmd+Shift+R on Mac)
  2. CDN cache - Wait 5-10 minutes for propagation
  3. GitHub Pages build failed - Check repository Actions tab
  4. Wrong branch - Ensure pushing to main branch
Solution:
# Check current branch
git branch

# View push status
git log -1

# Force push if needed (use carefully)
git push -f origin main
Checklist:
  1. CNAME file exists in repository root
  2. CNAME contains only domain (no https:// or /)
  3. DNS records configured at registrar
  4. DNS propagation complete (check with dig r.foo.ng)
  5. HTTPS enforcement disabled temporarily
Verify DNS:
# Check DNS resolution
dig r.foo.ng

# Should show CNAME pointing to rdotsvg.github.io
Common issues:
  1. Username mismatch in script URL
  2. Status.cafe service down
  3. Ad blocker blocking external scripts
  4. CORS policy on some networks
Test widget:
<!-- Verify username is correct -->
<script src="https://status.cafe/current-status.js?name=raster" defer></script>

<!-- Check widget container exists -->
<div id="statuscafe">
  <div id="statuscafe-username"></div>
  <div id="statuscafe-content"></div>
</div>

Build docs developers (and LLMs) love