Skip to content

Commit 8101353

Browse files
Ajit Pratap Singhclaude
authored andcommitted
fix(website): audit quick-wins — canonical, JSON-LD, security headers, skip-nav, broken links, unused assets
- Fix robots.txt sitemap URL (sitemap-index.xml → sitemap.xml) so Googlebot can discover sitemap - Delete 1.28 MB of unused logo assets (logo-text.svg 931KB, logo.svg 309KB, logo.png 44KB) - Fix GitHub owner links site-wide: ajitpsingh → ajitpratap0 in Footer.tsx and Navbar.tsx - Add HSTS (max-age=31536000; includeSubDomains; preload) and Permissions-Policy headers - Remove unsafe-eval from CSP script-src; add frame-ancestors/base-uri/form-action directives - Add alternates.canonical to layout (homepage), docs pages, and blog pages - Add JSON-LD SoftwareApplication structured data in root layout - Fix og:url on docs and blog pages to use per-page URLs - Add skip-to-main-content link (WCAG 2.4.1) and wrap page content in <main id="main-content"> - Remove broken Vercel Analytics component (was causing 2x 404 console errors per page) - Add audit SUMMARY.md with all findings and GitHub issue references (#396#405) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4c98aba commit 8101353

11 files changed

Lines changed: 117 additions & 52 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# GoSQLX Website Audit Summary — 2026-03-17
2+
3+
## Overall Health
4+
5+
| Category | Top Finding | Status |
6+
|----------|-------------|--------|
7+
| Performance | JS 627KB home / 985KB playground; WASM no preload | 🟡 |
8+
| SEO | No canonical tags; broken sitemap discovery; no JSON-LD | 🔴 |
9+
| Accessibility | No skip link; contrast failures; code blocks not keyboard accessible | 🟡 |
10+
| Security | Missing HSTS + Permissions-Policy; unsafe-eval in CSP | 🟡 |
11+
| Visual/Responsive | Homepage sections invisible below hero; overflow at 320px | 🔴 |
12+
| Functional | Wrong GitHub owner links; 404 returns 200; broken .md doc links | 🔴 |
13+
| Content | 1.28 MB unused assets; missing blog post for latest release | 🟡 |
14+
15+
## Fixes Applied in This PR
16+
17+
| # | Fix | File Changed | Impact |
18+
|---|-----|--------------|--------|
19+
| 1 | Fixed robots.txt sitemap URL | website/public/robots.txt | SEO: sitemap now discoverable |
20+
| 2 | Deleted 1.28 MB unused assets | website/public/images/ | Perf: reduced repo size |
21+
| 3 | Fixed GitHub owner links (ajitpsingh → ajitpratap0) | website/src/components/layout/Footer.tsx, Navbar.tsx | Functional: correct repo links site-wide |
22+
| 4 | Added HSTS + Permissions-Policy security headers | website/next.config.ts | Security |
23+
| 5 | Removed unsafe-eval from CSP; added frame-ancestors/base-uri/form-action | website/next.config.ts | Security |
24+
| 6 | Added canonical to layout (homepage) | website/src/app/layout.tsx | SEO |
25+
| 7 | Added JSON-LD SoftwareApplication structured data | website/src/app/layout.tsx | SEO |
26+
| 8 | Added canonical + og:url to docs pages | website/src/app/docs/[...slug]/page.tsx | SEO |
27+
| 9 | Added canonical + og:url + og:type to blog pages | website/src/app/blog/[slug]/page.tsx | SEO |
28+
| 10 | Added skip-to-main-content link | website/src/app/layout.tsx | A11y |
29+
| 11 | Wrapped page content in `<main id="main-content">` | website/src/app/layout.tsx | A11y |
30+
| 12 | Removed broken Vercel Analytics component | website/src/app/layout.tsx | Perf: eliminates 2 console errors per page |
31+
32+
## GitHub Issues Created for Complex Fixes
33+
34+
- #396 — fix(website): homepage sections invisible below hero (IntersectionObserver)
35+
- #397 — fix(website): 404 page returns HTTP 200 status
36+
- #398 — fix(website): broken .md links in docs content files
37+
- #399 — a11y(website): fix color contrast violations
38+
- #400 — a11y(website): make code blocks keyboard accessible (tabindex=0)
39+
- #401 — fix(website): horizontal overflow at 320px viewport
40+
- #402 — perf(website): add rel=preload for gosqlx.wasm
41+
- #403 — perf(website): version WASM service worker cache key
42+
- #404 — seo(website): add JSON-LD Article to blog, BreadcrumbList to docs
43+
- #405 — content(website): add blog post for latest release
44+
45+
## Audit Reports
46+
- [Performance](performance.md)
47+
- [SEO](seo.md)
48+
- [Accessibility](accessibility.md)
49+
- [Security](security.md)
50+
- [Functional](functional.md)
51+
- [Content](content.md)

website/next.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ const nextConfig: NextConfig = {
1515
headers: [
1616
{
1717
key: 'Content-Security-Policy',
18-
value: "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' https://img.shields.io https://goreportcard.com https://*.shields.io data:; connect-src 'self' https://*.sentry.io; worker-src 'self' blob:",
18+
value: "default-src 'self'; script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' https://img.shields.io https://goreportcard.com https://*.shields.io data:; connect-src 'self' https://*.sentry.io; worker-src 'self' blob:; frame-ancestors 'none'; base-uri 'self'; form-action 'self'",
19+
},
20+
{
21+
key: 'Strict-Transport-Security',
22+
value: 'max-age=31536000; includeSubDomains; preload',
23+
},
24+
{
25+
key: 'Permissions-Policy',
26+
value: 'camera=(), microphone=(), geolocation=(), interest-cohort=()',
1927
},
2028
{
2129
key: 'X-Frame-Options',

website/public/images/logo-text.svg

Lines changed: 0 additions & 20 deletions
This file was deleted.

website/public/images/logo.png

-43.4 KB
Binary file not shown.

website/public/images/logo.svg

Lines changed: 0 additions & 20 deletions
This file was deleted.

website/public/robots.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
User-agent: *
22
Allow: /
33

4-
Sitemap: https://gosqlx.dev/sitemap-index.xml
4+
Sitemap: https://gosqlx.dev/sitemap.xml

website/src/app/blog/[slug]/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
2121
return {
2222
title: post.title,
2323
description: `GoSQLX ${post.title} release notes.`,
24+
alternates: {
25+
canonical: `https://gosqlx.dev/blog/${slug}/`,
26+
},
2427
openGraph: {
2528
title: `GoSQLX ${post.title}`,
2629
description: `GoSQLX ${post.title} release notes.`,
2730
type: 'article',
2831
publishedTime: post.date ? `${post.date}T00:00:00Z` : undefined,
32+
url: `https://gosqlx.dev/blog/${slug}/`,
2933
},
3034
};
3135
}

website/src/app/docs/[...slug]/page.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ export async function generateMetadata({ params }: PageProps): Promise<Metadata>
2929
return {
3030
title: doc.title,
3131
description: `GoSQLX documentation - ${doc.title}`,
32+
alternates: {
33+
canonical: `https://gosqlx.dev/docs/${slugStr}/`,
34+
},
35+
openGraph: {
36+
url: `https://gosqlx.dev/docs/${slugStr}/`,
37+
},
3238
};
3339
}
3440

website/src/app/layout.tsx

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { Metadata } from 'next';
22
import { instrumentSans, jetbrainsMono } from '@/lib/fonts';
33
import { Navbar } from '@/components/layout/Navbar';
44
import { Footer } from '@/components/layout/Footer';
5-
import { Analytics } from '@vercel/analytics/next';
65
import { ServiceWorkerRegister } from '@/components/ServiceWorkerRegister';
76
import './globals.css';
87

@@ -14,6 +13,9 @@ export const metadata: Metadata = {
1413
description:
1514
'High-performance, zero-copy SQL parsing SDK for Go. Thread-safe with multi-dialect support for PostgreSQL, MySQL, SQLite, SQL Server, Oracle, and Snowflake.',
1615
metadataBase: new URL('https://gosqlx.dev'),
16+
alternates: {
17+
canonical: 'https://gosqlx.dev',
18+
},
1719
openGraph: {
1820
type: 'website',
1921
locale: 'en_US',
@@ -45,11 +47,45 @@ export default function RootLayout({
4547
return (
4648
<html lang="en" className={`${instrumentSans.variable} ${jetbrainsMono.variable}`}>
4749
<body className="font-sans">
50+
<a
51+
href="#main-content"
52+
className="sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-50 focus:rounded-md focus:bg-white focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-black focus:shadow-lg focus:outline-none"
53+
>
54+
Skip to main content
55+
</a>
56+
<script
57+
type="application/ld+json"
58+
suppressHydrationWarning
59+
dangerouslySetInnerHTML={{
60+
__html: JSON.stringify({
61+
'@context': 'https://schema.org',
62+
'@type': 'SoftwareApplication',
63+
name: 'GoSQLX',
64+
applicationCategory: 'DeveloperApplication',
65+
operatingSystem: 'Any',
66+
url: 'https://gosqlx.dev',
67+
downloadUrl: 'https://github.com/ajitpratap0/GoSQLX/releases',
68+
codeRepository: 'https://github.com/ajitpratap0/GoSQLX',
69+
programmingLanguage: 'Go',
70+
description: 'High-performance, zero-copy SQL parsing SDK for Go',
71+
offers: {
72+
'@type': 'Offer',
73+
price: '0',
74+
priceCurrency: 'USD',
75+
},
76+
publisher: {
77+
'@type': 'Organization',
78+
name: 'GoSQLX',
79+
url: 'https://gosqlx.dev',
80+
sameAs: ['https://github.com/ajitpratap0/GoSQLX'],
81+
},
82+
}),
83+
}}
84+
/>
4885
<Navbar />
49-
<div className="pt-16">{children}</div>
86+
<main id="main-content" className="pt-16">{children}</main>
5087
<Footer />
5188
<ServiceWorkerRegister />
52-
<Analytics />
5389
</body>
5490
</html>
5591
);

website/src/components/layout/Footer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ const FOOTER_LINKS = {
1515
{ label: 'Getting Started', href: '/docs/getting-started' },
1616
{ label: 'API Reference', href: '/docs/api-reference' },
1717
{ label: 'Blog', href: '/blog' },
18-
{ label: 'Changelog', href: 'https://github.com/ajitpsingh/GoSQLX/blob/main/CHANGELOG.md', external: true },
18+
{ label: 'Changelog', href: 'https://github.com/ajitpratap0/GoSQLX/blob/main/CHANGELOG.md', external: true },
1919
{ label: 'Privacy Policy', href: '/privacy' },
2020
],
2121
Community: [
22-
{ label: 'GitHub', href: 'https://github.com/ajitpsingh/GoSQLX', external: true },
23-
{ label: 'Issues', href: 'https://github.com/ajitpsingh/GoSQLX/issues', external: true },
24-
{ label: 'Discussions', href: 'https://github.com/ajitpsingh/GoSQLX/discussions', external: true },
25-
{ label: 'Releases', href: 'https://github.com/ajitpsingh/GoSQLX/releases', external: true },
22+
{ label: 'GitHub', href: 'https://github.com/ajitpratap0/GoSQLX', external: true },
23+
{ label: 'Issues', href: 'https://github.com/ajitpratap0/GoSQLX/issues', external: true },
24+
{ label: 'Discussions', href: 'https://github.com/ajitpratap0/GoSQLX/discussions', external: true },
25+
{ label: 'Releases', href: 'https://github.com/ajitpratap0/GoSQLX/releases', external: true },
2626
],
2727
};
2828

0 commit comments

Comments
 (0)