---
import '../../styles/normalize.css';
import DefaultTags from '../../components/DefaultTags.astro';
import YarTags from '../../components/themes/yar/YarTags.astro';
import SeoHead from '../../components/seo/SeoHead.astro';
import { site } from '../../lib/siteConfig';
import { getTagSummaries } from '../../lib/posts';

const tags = getTagSummaries();
const theme = site.theme?.trim().toLowerCase() ?? 'default';
const TagsView = theme === 'yar' ? YarTags : DefaultTags;
const description = `${site.title} 的全部文章标签`;
---

<!doctype html>
<html lang={site.language}>
  <head>
    <SeoHead title="标签" description={description} path="/tags/" />
  </head>
  <body>
    <TagsView tags={tags} />
  </body>
</html>
