chore: dasdsad
This commit is contained in:
@@ -1,32 +1,21 @@
|
||||
---
|
||||
import fetchApi from "../lib/strapi";
|
||||
import type { ArticleData } from "../interfaces/article";
|
||||
|
||||
const articles = await fetchApi<ArticleData[]>({
|
||||
endpoint: "articles?populate=image",
|
||||
wrappedByKey: "data",
|
||||
});
|
||||
|
||||
console.log('Articles response:', articles);
|
||||
import BaseHead from '../components/BaseHead.astro';
|
||||
import Header from '../components/Header.astro';
|
||||
import Footer from '../components/Footer.astro';
|
||||
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Blog</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<ul>
|
||||
{
|
||||
articles.map((article) => (
|
||||
<li>
|
||||
<a href={`/blog/${article.slug}/`}>{article.title}</a>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
<head>
|
||||
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
|
||||
</head>
|
||||
<body>
|
||||
<Header />
|
||||
<main>
|
||||
<h1>Ayo</h1>
|
||||
<p>foo, bar, baz, qux, quux</p>
|
||||
</main>
|
||||
<Footer />
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user