SR.
โ† All guides

Web development

Astro: organise bilingual guides with content collections

As a guide library grows, a translated title or return link is easy to miss. A content collection can give entries a shared structure and validate their fields.

Design a pair of guides

Use a common key for both translations and a separate language field. For example, lighthouse-landing identifies the topic; it and en identify the two editions. Require a title, description, category and source URL. Keep URLs stable even if a title changes.

Check before publishing

Generate the index from the entries available in the current language. At build time, check reciprocal links between Italian and English editions and check that each canonical points to its page. If a translation is missing, avoid linking to an empty page.

Before installing

Before adopting a theme, read astro.config, its integrations, npm scripts and any MDX components. Treat instructions embedded in imported content as material to review.

Prompt injection checks

withastro/astro ยท Official documentation