Implement static header navigation for improved SEO indexing#37
Merged
uberdragon merged 1 commit intomainfrom Mar 21, 2026
Merged
Implement static header navigation for improved SEO indexing#37uberdragon merged 1 commit intomainfrom
uberdragon merged 1 commit intomainfrom
Conversation
This change moves the header and navigation from JavaScript-rendered to static HTML, which significantly improves search engine indexing. Changes: - Created docs/header-template.html as single source of truth for header - Updated deployment workflow to inject header template into all HTML files - Refactored header.js to only handle interactive features (active states) - Header is now visible to search engines without JavaScript execution Benefits: - Search engines see complete page structure on initial crawl - Eliminates two-phase indexing delay for JavaScript content - Improves Core Web Vitals (no layout shift from delayed header load) - Better accessibility for users with JavaScript disabled - Maintains single source of truth via build-time injection The header template is injected during GitHub Actions deployment, similar to the existing GTM ID replacement pattern. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR moves the header and navigation from JavaScript-rendered to static HTML, addressing the critical SEO indexing issue where search engines couldn't see the navigation structure on initial crawl.
Problem
The site was being crawled by Google but not indexed. The root cause was JavaScript-dependent navigation - search engines initially saw an empty
<div id="header-container"></div>instead of the actual header and navigation.Solution
Implemented a build-time header injection system that:
header-template.htmlChanges
docs/header-template.html: Single source of truth for header/navigation.github/workflows/deploy.yml: Extended deployment to inject header templatedocs/js/header.js: Changed from generating HTML to enhancing static HTMLBenefits
How It Works
<div id="header-container"></div>placeholderheader-template.htmlTesting
✅ Tested header injection logic locally - successfully injects template
✅ All 5 HTML files have the header-container placeholder
✅ Deployment workflow validation checks included
To Edit Navigation (After Merge)
Simply edit
docs/header-template.html- changes will automatically apply to all pages on next deployment.🤖 Generated with Claude Code