---
import { AppConfig } from '@/utils/AppConfig';
import Base from '@/layouts/Base.astro';
import Section from '@/components/Section.astro';
import Tags from '@/components/Tags.astro';
import Heading from '@/components/Heading.astro';

const { title } = AppConfig;
const { description } = AppConfig;

const allPosts = await Astro.glob('../posts/*.md');

const allTags: Set<string> = new Set(allPosts.map((post) => post.frontmatter.tags).flat());
---

<Base head={{ title, description }}>
	<Section><Heading title="Tags" /></Section>
	<div class="mx-auto w-full max-w-screen-md">
		<Tags tags={[...allTags]} withHref={true} />
	</div>
</Base>
