feat(config): add SEO headTags, metadata, and structured data#318
feat(config): add SEO headTags, metadata, and structured data#318kunal-yelgate wants to merge 1 commit into
Conversation
❌ Deploy Preview for kmesh-net failed.
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
…urus config Signed-off-by: kunal_yelgate <kunalyelgatew@gmail.com>
|
Welcome @kunal-yelgate! It looks like this is your first PR to kmesh-net/website 🎉 |
a3fa9de to
a397405
Compare
There was a problem hiding this comment.
Code Review
This pull request updates docusaurus.config.js to add a tagline, social sharing image, structured JSON-LD data, and various SEO metadata tags. The review feedback highlights a critical SEO issue where a hardcoded global canonical link in headTags would incorrectly point all subpages to the homepage. Additionally, it recommends moving global meta tags from headTags to themeConfig.metadata to leverage Docusaurus's built-in metadata management and allow page-specific overrides.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| headTags: [ | ||
| { | ||
| tagName: "link", | ||
| attributes: { | ||
| rel: "canonical", | ||
| href: "https://kmesh.net", | ||
| }, | ||
| }, | ||
| { | ||
| tagName: "meta", | ||
| attributes: { | ||
| name: "description", | ||
| content: | ||
| "Kmesh is a high-performance, sidecarless service mesh dataplane based on eBPF and programmable kernel for cloud-native applications.", | ||
| }, | ||
| }, | ||
| { | ||
| tagName: "meta", | ||
| attributes: { | ||
| property: "og:type", | ||
| content: "website", | ||
| }, | ||
| }, | ||
| { | ||
| tagName: "meta", | ||
| attributes: { | ||
| property: "og:site_name", | ||
| content: "Kmesh", | ||
| }, | ||
| }, | ||
| { | ||
| tagName: "meta", | ||
| attributes: { | ||
| name: "twitter:card", | ||
| content: "summary_large_image", | ||
| }, | ||
| }, | ||
| { | ||
| tagName: "meta", | ||
| attributes: { | ||
| name: "twitter:site", | ||
| content: "@Kmesh_net", | ||
| }, | ||
| }, |
There was a problem hiding this comment.
SEO & Docusaurus Best Practices Improvements
- Remove Hardcoded Canonical Link: Docusaurus automatically generates the correct canonical URL (
<link rel="canonical" href="..." />) for every page of your site using the globalurlandbaseUrlconfiguration (which are already set). Hardcoding a global canonical link tohttps://kmesh.netinheadTagswill apply to all pages (e.g., documentation pages, blog posts), pointing their canonical URLs back to the homepage. This is a severe SEO issue as search engines will index only the homepage and ignore all other pages. - Move Meta Tags to
themeConfig.metadata: UsingheadTagsinjects these tags statically into every page, which can result in duplicate tags (e.g., multiple<meta name="description">tags) when individual pages or blog posts define their own descriptions or custom metadata. Defining them inthemeConfig.metadataallows Docusaurus to manage them properly and lets individual pages override them seamlessly.
Let's remove the canonical link and move the meta tags to themeConfig.metadata.
| headTags: [ | |
| { | |
| tagName: "link", | |
| attributes: { | |
| rel: "canonical", | |
| href: "https://kmesh.net", | |
| }, | |
| }, | |
| { | |
| tagName: "meta", | |
| attributes: { | |
| name: "description", | |
| content: | |
| "Kmesh is a high-performance, sidecarless service mesh dataplane based on eBPF and programmable kernel for cloud-native applications.", | |
| }, | |
| }, | |
| { | |
| tagName: "meta", | |
| attributes: { | |
| property: "og:type", | |
| content: "website", | |
| }, | |
| }, | |
| { | |
| tagName: "meta", | |
| attributes: { | |
| property: "og:site_name", | |
| content: "Kmesh", | |
| }, | |
| }, | |
| { | |
| tagName: "meta", | |
| attributes: { | |
| name: "twitter:card", | |
| content: "summary_large_image", | |
| }, | |
| }, | |
| { | |
| tagName: "meta", | |
| attributes: { | |
| name: "twitter:site", | |
| content: "@Kmesh_net", | |
| }, | |
| }, | |
| headTags: [ |
| metadata: [ | ||
| { | ||
| name: "keywords", | ||
| content: | ||
| "Kmesh, service mesh, eBPF, dataplane, Kubernetes, sidecarless, cloud-native, CNCF, high-performance networking", | ||
| }, | ||
| { | ||
| name: "author", | ||
| content: "Kmesh Community", | ||
| }, | ||
| { | ||
| name: "robots", | ||
| content: "index, follow", | ||
| }, | ||
| ], |
There was a problem hiding this comment.
Move the global meta tags (description, og:type, og:site_name, twitter:card, and twitter:site) from headTags to themeConfig.metadata so that Docusaurus can manage them properly and allow page-specific overrides.
metadata: [
{
name: "description",
content:
"Kmesh is a high-performance, sidecarless service mesh dataplane based on eBPF and programmable kernel for cloud-native applications.",
},
{
property: "og:type",
content: "website",
},
{
property: "og:site_name",
content: "Kmesh",
},
{
name: "twitter:card",
content: "summary_large_image",
},
{
name: "twitter:site",
content: "@Kmesh_net",
},
{
name: "keywords",
content:
"Kmesh, service mesh, eBPF, dataplane, Kubernetes, sidecarless, cloud-native, CNCF, high-performance networking",
},
{
name: "author",
content: "Kmesh Community",
},
{
name: "robots",
content: "index, follow",
},
],
Adds global SEO configuration to
docusaurus.config.jsincluding Open Graph, Twitter Cards, and JSON-LD structured data.Changes
headTags: Canonical link, meta description, OG tags, Twitter Card tags, Organization JSON-LDthemeConfig.metadata: Keywords, author, robots directivesimage: Default social sharing card (img/kmesh-social-card.png)Why
Pages currently lack any SEO metadata, causing poor search rankings and broken social previews.
Testing
<head>via dev toolsFixes #317