2022-09-09 11:53:35 +00:00
|
|
|
---
|
|
|
|
import { HomePage } from '../components/Views/Home'
|
|
|
|
import Zine from '../layouts/zine.astro'
|
|
|
|
import { apiClient } from '../utils/apiClient'
|
|
|
|
|
2022-09-14 15:44:06 +00:00
|
|
|
const limit = 50
|
|
|
|
const offset = 0
|
2022-09-09 11:53:35 +00:00
|
|
|
const randomTopics = await apiClient.getRandomTopics()
|
2022-09-14 11:27:10 +00:00
|
|
|
const recentPublished = await apiClient.getRecentPublishedArticles({ limit, offset })
|
2022-09-09 11:53:35 +00:00
|
|
|
const topMonth = await apiClient.getTopMonthArticles()
|
|
|
|
const topOverall = await apiClient.getTopArticles()
|
|
|
|
|
|
|
|
Astro.response.headers.set('Cache-Control', 's-maxage=1, stale-while-revalidate')
|
|
|
|
---
|
|
|
|
|
|
|
|
<Zine>
|
|
|
|
<HomePage
|
|
|
|
recentPublishedArticles={recentPublished}
|
2022-09-14 11:28:43 +00:00
|
|
|
randomTopics={randomTopics}
|
2022-09-13 09:59:04 +00:00
|
|
|
topMonthArticles={topMonth}
|
2022-09-09 11:53:35 +00:00
|
|
|
topOverallArticles={topOverall}
|
|
|
|
client:load
|
|
|
|
/>
|
|
|
|
</Zine>
|