This commit is contained in:
Andrey Kuvshinov
2025-12-13 23:29:25 +03:00
parent 40aa3d7814
commit 80fb06e420
8 changed files with 574 additions and 60 deletions

View File

@@ -1,18 +1,18 @@
---
import { getSiteInfo } from "../lib/wp-api.js";
import { getLatestPosts } from '../lib/api/posts.js';
import { getLatestPosts } from '@api/posts.js';
const site = await getSiteInfo();
const initialPosts = await getLatestPosts(36); // Начальная загрузка 12 постов
// визуальные компоненты
import MainLayout from '../layouts/MainLayout.astro';
import ContentGrid from '../components/ContentGrid.astro';
import EndnewsList from '../components/EndnewsList.astro';
import MainLayout from '@layouts/MainLayout.astro';
import ContentGrid from '@components/ContentGrid.astro';
import EndnewsList from '@components/EndnewsList.astro';
export const prerender = {
isr: { expiration: 3 } // ISR: обновлять раз в 3 секунды
};
//export const prerender = {
// isr: { expiration: 3 } // ISR: обновлять раз в 3 секунды
//};
---
<MainLayout