Skip to content

Metadata i18n #54

Description

@xavier506

Localized Metadata Guide for Docusaurus

Current Setup

Your site currently has:

  • ✅ English metadata configured globally in docusaurus.config.js
  • ✅ Proper hreflang tags in the sitemap for SEO
  • ✅ Spanish translations for UI elements in i18n/es/

Simplest Ways to Add Spanish Metadata

Option 1: Page-Level Front Matter (Simplest)

For individual pages that need Spanish metadata, add front matter to the Spanish markdown files:

---
title: "Sistemas Edenia Hub de Desarrollo | Documentación Web3 y IA"
description: "Documentación oficial para desarrolladores de Sistemas Edenia. Domina Web3, blockchain, IA, EOSIO y Antelope con ejemplos de código listos para producción."
keywords: 
  - Sistemas Edenia
  - desarrollo Web3
  - documentación blockchain
  - EOSIO
  - Antelope blockchain
---

# Tu contenido aquí...

Option 2: Category-Level Metadata

For entire sections, use _category_.json files in Spanish folders:

{
  "label": "Blockchain y Web3",
  "position": 2,
  "customProps": {
    "description": "Recursos y documentación sobre Blockchain y Web3 en español"
  }
}

Option 3: Global Spanish Override (Advanced)

If you need global Spanish metadata later, you can:

  1. Create a custom Docusaurus plugin
  2. Use the @docusaurus/plugin-client-redirects with custom headers
  3. Implement server-side rendering customization

What You Have Now

  1. English metadata is properly configured and optimized for SEO
  2. Hreflang tags are automatically generated in your sitemap
  3. Google already knows your site has Spanish content via DNS verification

Recommendations

For your use case, I recommend:

  1. Keep the current setup - it's clean and working
  2. Add front matter only to high-traffic Spanish pages
  3. Focus on content quality - Google is smart enough to understand language context
  4. Monitor Search Console to see how Spanish pages perform

Example Implementation

Here's how to add Spanish metadata to a specific page:

# Edit a Spanish page
vi i18n/es/docusaurus-plugin-content-docs/current/blockchain-web3/index.md

Add at the top:

---
title: "Blockchain y Web3 | Sistemas Edenia"
description: "Aprende sobre tecnología blockchain, Web3, contratos inteligentes y desarrollo descentralizado con las guías expertas de Sistemas Edenia."
---

Testing

To verify your metadata:

  1. Build the site: npm run build
  2. Serve locally: npm run serve
  3. Check Spanish pages: http://localhost:3000/es/
  4. View page source to see metadata

Note

The sitemap already includes proper hreflang tags, which is the most important factor for international SEO. Additional page-level metadata is optional but can help with click-through rates in search results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SEOSearch Engine Optimization

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions