Skip to content

Commit

Permalink
Merge pull request #266 from hamzab-01/update-slug-route
Browse files Browse the repository at this point in the history
fix(routing/posts): updated slug to match all subdirs
  • Loading branch information
chrismwilliams authored Jul 19, 2024
2 parents ff51762 + d5f1e0a commit c6be4ef
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
import type { GetStaticPaths, InferGetStaticPropsType } from "astro";
import PostLayout from "@/layouts/BlogPost.astro";
import { getAllPosts } from "@/data/post";
import PostLayout from "@/layouts/BlogPost.astro";
// if you're using an adaptor in SSR mode, getStaticPaths wont work -> https://docs.astro.build/en/guides/routing/#modifying-the-slug-example-for-ssr
export const getStaticPaths = (async () => {
const blogEntries = await getAllPosts();
return blogEntries.map((entry) => ({
Expand Down

0 comments on commit c6be4ef

Please sign in to comment.