import Footer from "../../components/footer/Footer";
import Header from "../../components/header/Header";
import fetchApi from "../../lib/strapi";
import type Post from "../../interfaces/post";
import "../../styles/global.css";
export async function getStaticPaths() {
const posts = await fetchApi<Post[]>({
endpoint: "posts",
wrappedByKey: "data",
});
return posts.map((post) => ({
params: { slug: post.attributes.slug },
props: post,
}));
}
type Props = Post;
const post = Astro.props;
</style>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico?" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>1</title>
<meta
name="description"
content="Educity is dedicated in providing free education to everyone in various fields of computer science"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="keywords"
content="learning, courses, education, tutorial, web development"
/>
<meta
name="author"
content="learning, courses, education, tutorial, web development"
/>
</head>
<body>
<Header client:load />
<div class="container-post min-h-full pt-28">
<h1 class="font-bold">{post.attributes.title}</h1>
<!-- I want to create article component of which content is post.attributes.title -->
</div>
<Footer />
</body>
</html>