mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
fix(seo): resolve 7 SEO issues from GitHub Issue #4
SEO improvements for better search engine optimization: 1. Canonical URL - Added client-side dynamic canonical link tags for posts and pages 2. Single H1 per page - Markdown H1s demoted to H2 with .blog-h1-demoted class (maintains H1 visual styling) 3. DOM order fix - Article now loads before sidebar in DOM for SEO (CSS order property maintains visual layout) 4. X-Robots-Tag - HTTP header added via netlify.toml (index, follow for public; noindex for dashboard/api routes) 5. Hreflang tags - Self-referencing hreflang (en, x-default) for language targeting 6. og:url consistency - Uses same canonicalUrl variable as canonical link tag 7. twitter:site - New TwitterConfig in siteConfig.ts for Twitter Cards meta tags Files modified: - src/config/siteConfig.ts: Added TwitterConfig interface with site/creator fields - src/pages/Post.tsx: SEO meta tags for posts/pages, DOM order optimization - src/components/BlogPost.tsx: H1 to H2 demotion in markdown renderer - src/styles/global.css: .blog-h1-demoted class, CSS order properties - convex/http.ts: hreflang and twitter:site in generateMetaHtml() - netlify.toml: X-Robots-Tag headers for public, dashboard, API routes - index.html: canonical, hreflang, twitter:site placeholder tags - fork-config.json.example: twitter configuration fields Closes #4 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
10
index.html
10
index.html
@@ -21,6 +21,13 @@
|
||||
/>
|
||||
<meta name="robots" content="index, follow" />
|
||||
|
||||
<!-- Canonical URL -->
|
||||
<link rel="canonical" href="https://www.markdown.fast/" />
|
||||
|
||||
<!-- Hreflang for language/region targeting -->
|
||||
<link rel="alternate" hreflang="en" href="https://www.markdown.fast/" />
|
||||
<link rel="alternate" hreflang="x-default" href="https://www.markdown.fast/" />
|
||||
|
||||
<!-- Theme -->
|
||||
<meta name="theme-color" content="#faf8f5" />
|
||||
|
||||
@@ -54,6 +61,9 @@
|
||||
name="twitter:image"
|
||||
content="https://www.markdown.fast/images/og-default.png"
|
||||
/>
|
||||
<!-- twitter:site - configure in siteConfig.ts for your Twitter handle -->
|
||||
<meta name="twitter:site" content="" />
|
||||
<meta name="twitter:creator" content="" />
|
||||
|
||||
<!-- RSS Feeds -->
|
||||
<link
|
||||
|
||||
Reference in New Issue
Block a user