---
import { getCollection, render } from 'astro:content';
import { siteConfig } from '@/config';
import BaseLayout from '@/layouts/BaseLayout.astro';
import Icon from '@/components/Icon.astro';
// Try to get 404 page content from special collection
let pageContent = null;
try {
const specialPages = await getCollection('special');
const notFoundPage = specialPages.find(page => page.id === '404');
if (notFoundPage) {
pageContent = await render(notFoundPage);
}
} catch (error) {
}
// SEO data for 404 page
const seoData = {
title: `Page Not Found | ${siteConfig.title}`,
description: 'The page you are looking for could not be found.',
canonical: Astro.url.href,
ogType: 'website' as const
};
// Set proper status code
Astro.response.status = 404;
---
404
Page Not Found
{pageContent ? (
) : (
Sorry, we couldn't find the page you're looking for. The page may have been moved, deleted, or the URL might be incorrect.
Don't worry though, there's plenty of other content to explore!