Skip to content

Commit

Permalink
edit: remove experimental from content collections!
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev committed Jan 12, 2023
1 parent 5c52a20 commit b21283f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
15 changes: 1 addition & 14 deletions src/pages/en/guides/content-collections.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: ~/layouts/MainLayout.astro
title: Content Collections (Experimental)
title: Content Collections
description: >-
Content collections help organize your Markdown and type-check your
frontmatter with schemas.
Expand All @@ -25,19 +25,6 @@ Content collections help organize your Markdown or MDX and type-check your front

First, run the [`astro dev`](/en/reference/cli-reference/#astro-dev), [`astro build`](/en/reference/cli-reference/#astro-build), or [`astro sync`](/en/reference/cli-reference/#astro-sync) commands to generate types. This will make the `astro:content` module available for [querying](#querying-content-collections) and [configuring](#configuring-collections) your content collections.

Content Collections are experimental. To enable this feature, set the `experimental.contentCollections` flag in your Astro config:

```js
// astro.config.mjs
import { defineConfig } from 'astro';

export default defineConfig({
experimental: {
contentCollections: true,
},
});
```

### Update TypeScript configuration

To benefit from the full TypeScript and autocompletion features of [using schemas with your collections](#defining-a-collection-schema), you may also need to update `tsconfig.json`. Follow the instructions below based on your Astro project's current [TypeScript configuration](/en/guides/typescript/#setup).
Expand Down
2 changes: 1 addition & 1 deletion src/pages/en/reference/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ Pagination will pass a `page` prop to every rendered page that represents a sing
| `page.url.prev` | `string \| undefined` | Get the URL of the previous page (will be `undefined` if on page 1). |
| `page.url.next` | `string \| undefined` | Get the URL of the next page (will be `undefined` if no more pages). |

## Content Collections (Experimental)
## Content Collections

<p>
<Since v="1.7.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/en/reference/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ This command only checks types within `.astro` files.
Running `astro dev` or `astro build` will run the `sync` command as well.
:::

Generates TypeScript types for all Astro modules. This sets up a [`src/env.d.ts` file](/en/guides/typescript/#setup) for type inferencing, and defines the `astro:content` module for the (experimental) [Content Collections API](/en/guides/content-collections/).
Generates TypeScript types for all Astro modules. This sets up a [`src/env.d.ts` file](/en/guides/typescript/#setup) for type inferencing, and defines the `astro:content` module for the [Content Collections API](/en/guides/content-collections/).

## `astro add`

Expand Down

0 comments on commit b21283f

Please sign in to comment.