1
1
---
2
- import { getCollection } from " astro:content" ;
2
+ import { getCollection , render } from " astro:content" ;
3
3
import PageLayout from " ../../layouts/PageLayout.astro" ;
4
4
5
5
export async function getStaticPaths() {
@@ -9,14 +9,14 @@ export async function getStaticPaths() {
9
9
const prevTestimonial = testimonialsEntries .at (
10
10
(index - 1 ) % testimonialsEntries .length ,
11
11
);
12
- const prevLink = prevTestimonial && prevTestimonial .slug ;
12
+ const prevLink = prevTestimonial && prevTestimonial .id ;
13
13
const nextTestimonial = testimonialsEntries .at (
14
14
(index + 1 ) % testimonialsEntries .length ,
15
15
);
16
- const nextLink = nextTestimonial && nextTestimonial .slug ;
16
+ const nextLink = nextTestimonial && nextTestimonial .id ;
17
17
18
18
return {
19
- params: { slug : entry .slug },
19
+ params: { id : entry .id },
20
20
props: {
21
21
entry ,
22
22
prevLink ,
@@ -28,7 +28,8 @@ export async function getStaticPaths() {
28
28
}
29
29
30
30
const { entry, prevLink, nextLink, color } = Astro .props ;
31
- const { Content } = await entry .render ();
31
+ const { Content } = await render (entry );
32
+ console .log (entry );
32
33
const { title, author, profilePicture } = entry .data ;
33
34
const pageTitle = ` Testimonial of ${title } ` ;
34
35
const mainTitle = pageTitle ;
0 commit comments