इसे छोड़कर कंटेंट पर जाएं

Legacy flags

यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।

To help some users migrate between versions of Astro, we occasionally introduce legacy flags.

These flags allow you to opt in to some deprecated or otherwise outdated behavior of Astro in the latest version, so that you can continue to upgrade and take advantage of new Astro releases until you are able to fully update your project code.

जोड़ा गया: astro@6.0.0 बीटा

The legacy.collectionsBackwardsCompat flag provides temporary backwards compatibility for projects unable to migrate to the Content Layer API introduced in v5.0.

astro.config.mjs
export default defineConfig({
legacy: {
collectionsBackwardsCompat: true,
},
});

This flag preserves some legacy v4 content collections features:

  • Supports type: 'content' and type: 'data' without loaders
  • Preserves legacy entry API: entry.slug and entry.render()
  • Uses path-based entry IDs instead of slug-based IDs

This is a temporary migration helper. Migrate collections to the Content Layer API, then disable this flag.

योगदान करें समुदाय प्रायोजक