summaryrefslogtreecommitdiff
path: root/.changeset/neat-eagles-trade.md
diff options
context:
space:
mode:
Diffstat (limited to '.changeset/neat-eagles-trade.md')
-rw-r--r--.changeset/neat-eagles-trade.md24
1 files changed, 0 insertions, 24 deletions
diff --git a/.changeset/neat-eagles-trade.md b/.changeset/neat-eagles-trade.md
deleted file mode 100644
index b92353e8e..000000000
--- a/.changeset/neat-eagles-trade.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-'astro': major
----
-
-Move getEntry to getEntryBySlug
-
-This change moves `getEntry` to `getEntryBySlug` and accepts a slug rather than an id.
-
-In order to improve support in `[id].astro` routes, particularly in SSR where you do not know what the id of a collection is. Using `getEntryBySlug` instead allows you to map the `[id]` param in your route to the entry. You can use it like this:
-
-```astro
----
-import { getEntryBySlug } from 'astro:content';
-
-const entry = await getEntryBySlug('docs', Astro.params.id);
-
-if(!entry) {
- return new Response(null, {
- status: 404
- });
-}
----
-<!-- You have an entry! Use it! -->
-```