← gitpulse
Bug Fix·Pushed May 1, 2026·S

Favicon path corrected for GitHub Pages

The favicon is back, and browser tabs show the correct title. Site URLs now respect the GitHub Pages base path prefix so assets load properly in production.

The Gitpulse site had two browser-facing issues. First, the favicon wasn't loading on GitHub Pages deployments because the icon URL lacked the repository prefix — [[code]]/favicon.svg[[/code]] couldn't resolve when the site lived at [[code]]/repo-name/[[/code]]. Second, the home page tab title was just "gitpulse" instead of following the consistent [[code]]"{publicationName} — Gitpulse"[[/code]] pattern used elsewhere. Both are now fixed. Favicon URLs are constructed with the correct base path derived from the [[code]]GITHUB_REPOSITORY[[/code]] environment variable. The home page generates its own metadata with the matching title format. Users deploying to GitHub Pages will see the favicon again, and the tab title reflects the publication name as expected. In the [[code]]@gitpulse/site[[/code]] Next.js application.
Technical description
This fix addresses two small but visible issues in the Gitpulse site deployment. **Favicon base path**: The site previously hardcoded [[code]]'/favicon.svg'[[/code]] in the root layout metadata. On GitHub Pages, the site lives at a path like [[code]]/repo-name/[[/code]], so all asset URLs need that prefix. The fix introduces [[code ref=1]]REPO_BASE_PATH[[/code]], computed from the [[code]]GITHUB_REPOSITORY[[/code]] environment variable using the same logic as [[code]]next.config.js[[/code]]. The favicon URL now reads [[code]]${REPO_BASE_PATH}/favicon.svg[[/code]]. **Home page title**: The root layout set a static title of "gitpulse". The home page now exports [[code ref=2]]generateMetadata[[/code]], which calls [[code ref=3]]publicationName[[/code]] to construct a title matching the pattern [[code]]"{publicationName} — Gitpulse"[[/code]]. This aligns with the gitsky reference implementation. ````tsx file=site/src/app/layout.tsx const REPO_BASE_PATH = process.env.GITHUB_REPOSITORY?.split('/')[1] ? [[code]]/${process.env.GITHUB_REPOSITORY.split('/')[1]}[[/code]] : ''; export const metadata: Metadata = { icons: { icon: [{ url: [[code]]${REPO_BASE_PATH}/favicon.svg[[/code]], type: 'image/svg+xml' }], }, }; ```` ````tsx file=site/src/app/page.tsx export function generateMetadata(): Metadata { const repo = loadRepo(); return { title: [[code]]${publicationName(repo)} — Gitpulse[[/code]], description: publicationSubtitle(repo), }; } ```` **Files at a Glance** - [[code]]site/src/app/layout.tsx[[/code]] — Added base path logic for favicon URL - [[code]]site/src/app/page.tsx[[/code]] — Added dynamic metadata generation with correct title format

Categories

  • Bug Fix (70%)The favicon was broken in production deployments — the URL path didn't account for GitHub Pages' repository prefix. The home page title also wasn't matching the expected pattern.
  • Maintenance (30%)Title format was inconsistent with the reference implementation; aligning it improves brand coherence across pages.