31 lines
567 B
Plaintext
31 lines
567 B
Plaintext
---
|
|
import MainLayout from '@layouts/MainLayout.astro';
|
|
import { getNodeByURI, getCategoryPosts } from '@lib/api/all';
|
|
|
|
export const prerender = false;
|
|
|
|
const { slug } = Astro.params;
|
|
const uri = slug ? `/${slug}` : '/';
|
|
|
|
let response;
|
|
let node = null;
|
|
|
|
try {
|
|
response = await getNodeByURI(uri);
|
|
node = response?.nodeByUri;
|
|
} catch (error) {
|
|
console.error('Error fetching node:', error);
|
|
}
|
|
|
|
// ISR кэширование
|
|
//Astro.response.headers.set(
|
|
// 'Cache-Control',
|
|
// 'public, s-maxage=3600, stale-while-revalidate=86400'
|
|
//);
|
|
---
|
|
|
|
News
|
|
|
|
<p>{uri}</p>
|
|
|