feat(seo): implement SEO-friendly report URLs, SSR, and dynamic sitemap#77
Merged
Conversation
…mic sitemap generation
jkondrat
approved these changes
May 26, 2026
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.
This Pull Request introduces a comprehensive SEO overhaul for InfraScan reports. Previously, reports were served strictly as a Single Page Application (SPA) under query parameters (
/?scan_id=<uuid>), which prevented search engines from properly crawling and indexing the valuable content within public scans.This update transitions reports to dedicated, semantic URLs, implements Server-Side Rendering (SSR) specifically tailored for web crawlers, and introduces rich metadata without breaking any existing shared links.
Key Features & Changes
1. SEO-Friendly & Semantic URLs
@app.route('/report/<path:scan_id>')./report/github-soldevelo-infrascan-7a58c6a3...), which increases keyword saturation and organic discoverability.app.js) to generate these semantic URLs for the "Share Results" functionality and within the "Recent Scans" history list.2. Bulletproof Backward Compatibility
/?scan_id=<uuid>are fully supported. The index route acts as an interceptor that reads the scan metadata, resolves the repository name, and performs a native HTTP301 Moved Permanentlyredirect to the new canonical URL. No user or existing external link is left behind.3. Server-Side Rendering (SSR) for Crawlers
templates/report.html(inheriting UI from index).<noscript>block inside the#results-contentcontainer. This block natively renders the entire report schema (Repository Name, Overall Grades, Cost/Security Findings, and Recommendations) in pure HTML.4. Rich Meta Tags & Structured Data
<title>,<meta name="description">, OpenGraph (og:*), and Twitter Card meta tags intoreport.htmlusing the report's metadata.<link rel="canonical" href="...">pointing directly to the SEO-friendly URL to prevent any duplicate content penalties.application/ld+jsonSchema.org Structured Data (TechArticleandReview) to enable Google Rich Results.5. Dynamic XML Sitemap
sitemap.xmlfile.@app.route('/sitemap.xml')endpoint that yields canonical links to all stored public reports, allowing search engines to discover reports easily.6. UX Improvements
/report/routes./) to begin a new scan flow.🧪 Testing
/?scan_id=<existing-uuid>properly redirects (301) to the new structure.<noscript>tag./sitemap.xmlsuccessfully lists all available non-private scans./report/repo-uuidpath.