Skip to content

feat(config): add SEO headTags, metadata, and structured data#318

Open
kunal-yelgate wants to merge 1 commit into
kmesh-net:mainfrom
kunal-yelgate:feat/seo-metadata-docusaurus
Open

feat(config): add SEO headTags, metadata, and structured data#318
kunal-yelgate wants to merge 1 commit into
kmesh-net:mainfrom
kunal-yelgate:feat/seo-metadata-docusaurus

Conversation

@kunal-yelgate

Copy link
Copy Markdown

Adds global SEO configuration to docusaurus.config.js including Open Graph, Twitter Cards, and JSON-LD structured data.

Changes

  • headTags: Canonical link, meta description, OG tags, Twitter Card tags, Organization JSON-LD
  • themeConfig.metadata: Keywords, author, robots directives
  • image: 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

  • Local build passes
  • All tags verified in page <head> via dev tools

Fixes #317

@netlify

netlify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Deploy Preview for kmesh-net failed.

Name Link
🔨 Latest commit a397405
🔍 Latest deploy log https://app.netlify.com/projects/kmesh-net/deploys/6a3d1b2b655afb0007eae004

@kmesh-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kevin-wangzefeng for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

…urus config

Signed-off-by: kunal_yelgate <kunalyelgatew@gmail.com>
@kmesh-bot

Copy link
Copy Markdown
Collaborator

Welcome @kunal-yelgate! It looks like this is your first PR to kmesh-net/website 🎉

@kunal-yelgate kunal-yelgate force-pushed the feat/seo-metadata-docusaurus branch from a3fa9de to a397405 Compare June 25, 2026 12:12

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docusaurus.config.js
Comment on lines +23 to +66
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",
},
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

SEO & Docusaurus Best Practices Improvements

  1. Remove Hardcoded Canonical Link: Docusaurus automatically generates the correct canonical URL (<link rel="canonical" href="..." />) for every page of your site using the global url and baseUrl configuration (which are already set). Hardcoding a global canonical link to https://kmesh.net in headTags will 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.
  2. Move Meta Tags to themeConfig.metadata: Using headTags injects 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 in themeConfig.metadata allows 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.

Suggested change
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: [

Comment thread docusaurus.config.js
Comment on lines +152 to +166
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",
},
],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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",
        },
      ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEO: Add Complete Metadata to Docusaurus Pages for Search Engine Optimization

2 participants