Skip to content

Conversation

@astrobot-houston
Copy link
Contributor

@astrobot-houston astrobot-houston commented Nov 7, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to next, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

next is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on next.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

[email protected]

Major Changes

Minor Changes

  • #14550 9c282b5 Thanks @ascorbic! - Adds support for live content collections

    Live content collections are a new type of content collection that fetch their data at runtime rather than build time. This allows you to access frequently updated data from CMSs, APIs, databases, or other sources using a unified API, without needing to rebuild your site when the data changes.

    Live collections vs build-time collections

    In Astro 5.0, the content layer API added support for adding diverse content sources to content collections. You can create loaders that fetch data from any source at build time, and then access it inside a page via getEntry() and getCollection(). The data is cached between builds, giving fast access and updates.

    However, there was no method for updating the data store between builds, meaning any updates to the data needed a full site deploy, even if the pages are rendered on demand. This meant that content collections were not suitable for pages that update frequently. Instead, these pages tended to access the APIs directly in the frontmatter. This worked, but it led to a lot of boilerplate, and meant users didn't benefit from the simple, unified API that content loaders offer. In most cases, users tended to individually create loader libraries shared between pages.

    Live content collections (introduced experimentally in Astro 5.10) solve this problem by allowing you to create loaders that fetch data at runtime, rather than build time. This means that the data is always up-to-date, without needing to rebuild the site.

    How to use

    To use live collections, create a new src/live.config.ts file (alongside your src/content.config.ts if you have one) to define your live collections with a live content loader using the new defineLiveCollection() function from the astro:content module:

    import { defineLiveCollection } from 'astro:content';
    import { storeLoader } from '@mystore/astro-loader';
    
    const products = defineLiveCollection({
      loader: storeLoader({
        apiKey: process.env.STORE_API_KEY,
        endpoint: 'https://api.mystore.com/v1',
      }),
    });
    
    export const collections = { products };

    You can then use the getLiveCollection() and getLiveEntry() functions to access your live data, along with error handling (since anything can happen when requesting live data!):

    ---
    import { getLiveCollection, getLiveEntry, render } from 'astro:content';
    // Get all products
    const { entries: allProducts, error } = await getLiveCollection('products');
    if (error) {
      // Handle error appropriately
      console.error(error.message);
    }
    
    // Get products with a filter (if supported by your loader)
    const { entries: electronics } = await getLiveCollection('products', { category: 'electronics' });
    
    // Get a single product by ID (string syntax)
    const { entry: product, error: productError } = await getLiveEntry('products', Astro.params.id);
    if (productError) {
      return Astro.redirect('/404');
    }
    
    // Get a single product with a custom query (if supported by your loader) using a filter object
    const { entry: productBySlug } = await getLiveEntry('products', { slug: Astro.params.slug });
    const { Content } = await render(product);
    ---
    
    <h1>{product.data.title}</h1>
    <Content />

    Upgrading from experimental live collections

    If you were using the experimental feature, you must remove the experimental.liveContentCollections flag from your astro.config.* file:

     export default defineConfig({
       // ...
    -  experimental: {
    -    liveContentCollections: true,
    -  },
     });

    No other changes to your project code are required as long as you have been keeping up with Astro 5.x patch releases, which contained breaking changes to this experimental feature. If you experience problems with your live collections after upgrading to Astro v6 and removing this flag, please review the Astro CHANGELOG from 5.10.2 onwards for any potential updates you might have missed, or follow the current v6 documentation for live collections.

Patch Changes

@astrojs/[email protected]

Major Changes

[email protected]

Major Changes

@astrojs/[email protected]

Major Changes

Patch Changes

@astrojs/[email protected]

Major Changes

Patch Changes

@astrojs/[email protected]

Major Changes

Patch Changes

@astrojs/[email protected]

Major Changes

@astrojs/[email protected]

Major Changes

@astrojs/[email protected]

Major Changes

@astrojs/[email protected]

Major Changes

Patch Changes

@astrojs/[email protected]

Major Changes

Patch Changes

@astrojs/[email protected]

Major Changes

Patch Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Minor Changes

Patch Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Patch Changes

@astrojs/[email protected]

Patch Changes

@astrojs/[email protected]

Patch Changes

@astrojs/[email protected]

Patch Changes

@github-actions github-actions bot added feat: markdown Related to Markdown (scope) pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope) pkg: example Related to an example package (scope) pkg: react Related to React (scope) pkg: preact Related to Preact (scope) pkg: solid Related to Solid (scope) pkg: integration Related to any renderer integration (scope) pkg: create-astro Related to the `create-astro` package (scope) pkg: astro Related to the core `astro` package (scope) labels Nov 7, 2025
Copy link
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

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

Needs some changesets changes first in another PR, Sarah dismiss once done!

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

📝 Changeset Validation Results

Changeset validation failed

Issues Found:

.changeset/fast-bushes-fall.md

Issue with: 'Deprecates Astro in getStaticPaths()'

❌ Verb 'Deprecates' is not appropriate for description for a major change type requiring removal.

💡 Replace 'Deprecates' with 'Removes support for' to align with the description requirements.

General Errors:

  • The term 'Deprecates' is used instead of an expected verb like 'Removes'.

General Suggestions:

  • Consider replacing 'Deprecates Astro in getStaticPaths()' with 'Removes support for Astro in getStaticPaths().'

.changeset/green-garlics-heal.md

Issue with: 'Deprecates import.meta.env.ASSETS_PREFIX'

❌ Verb may cause ambiguity to end-users.

💡 Consider rephrasing the verb to directly relate to actual current change type.

General Errors:

  • Uses 'Deprecates' for major type, supposed reserved for actual removal.

General Suggestions:

  • Though accurate, 'Deprecates' can be clarified as 'Announces removal' or similar for unambiguity.

📖 See Astro's changeset guide for details.

@github-actions github-actions bot force-pushed the changeset-release/next branch from a51b1f8 to 3db808d Compare November 7, 2025 17:47
@github-actions github-actions bot force-pushed the changeset-release/next branch from 3db808d to 2c172ef Compare November 7, 2025 17:48
Copy link
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

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

Looks pretty good I'd say!

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

Labels

feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope) pkg: create-astro Related to the `create-astro` package (scope) pkg: example Related to an example package (scope) pkg: integration Related to any renderer integration (scope) pkg: preact Related to Preact (scope) pkg: react Related to React (scope) pkg: solid Related to Solid (scope) pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants