<script>
	import { config } from '$lib/site.config.js';
	import dayjs from 'dayjs';
	export let data;
</script>

<!-- svelte-ignore a11y-missing-content -->
<svelte:head>
	<meta name="description" content={config.description} />
	<meta property="og:title" content="首页" />
	<meta property="og:type" content="article" />
	<meta property="og:url" content={`${config.url}`} />
	<meta property="og:image" content={`${config.url}/og/image/null/首页.webp`} />
	<prerender>
		<a href={`/og/image/null/首页.webp`} />
	</prerender>
</svelte:head>

<div>
	<ol>
		{#each data.files as post}
			{#if !config.ignoreFiles.includes(post.name)}
				<li>
					<span>{dayjs(post.date).format('YYYY/MM/DD')}</span><span> - </span>
					<a href={`/post/${post.name}`}>{post.title}</a>
				</li>
			{/if}
		{/each}
	</ol>
</div>

<style lang="postcss">
	* {
		@apply text-lg;
	}
	a {
		@apply visited:text-black dark:visited:text-white;
	}
</style>
