Translate Blog Post Skill
Use this skill when you need to translate an existing English blog post to Portuguese.
Context
English blog posts are located in src/content/blog/en/.
Portuguese blog posts must be placed in src/content/blog/pt/.
Instructions
- •Locate the Source: Find the English blog post in
src/content/blog/en/. - •Read Content: Read the entire content of the English post, including the frontmatter.
- •Determine the File Path: The output path should be
src/content/blog/pt/[filename]. The filename should be translated to have a Portugese slug for SEO (the project handles localized slugs via the directory structure). - •Translate Frontmatter:
- •
title: Translate to Portuguese. - •
description: Translate to Portuguese. - •
pubDate: Keep the same. - •
heroImage: Keep the same. - •
translationKey: CRITICAL. This MUST match thetranslationKeyof the English version exactly.
- •
- •Translate Body:
- •Translate all text content to Portuguese.
- •Keep all Markdown formatting (headings, lists, code blocks, etc.) exactly as they are.
- •Keep local image links and external URLs the same unless a Portuguese version is preferred.
- •Preserve any HTML tags or Astro-specific syntax.
- •Save File: Write the translated content to the determined path in
src/content/blog/pt/.
Example
English (en/my-first-post.md)
markdown
--- title: "Welcome to my blog" translationKey: "welcome-post" --- Hello everyone!
Portuguese (pt/meu-primeiro-post.md)
markdown
--- title: "Bem-vindo ao meu blog" translationKey: "welcome-post" --- Olá a todos!