| | |
| | | import { toJsxRuntime } from "hast-util-to-jsx-runtime" |
| | | import style from "../styles/listPage.scss" |
| | | import { PageList } from "../PageList" |
| | | import { ServerSlug, canonicalizeServer, getAllSegmentPrefixes } from "../../path" |
| | | import { ServerSlug, canonicalizeServer, getAllSegmentPrefixes, joinSegments } from "../../path" |
| | | import { QuartzPluginData } from "../../plugins/vfile" |
| | | |
| | | const numPages = 10 |
| | |
| | | const { tree, fileData, allFiles } = props |
| | | const slug = fileData.slug |
| | | |
| | | if (!slug?.startsWith("tags/")) { |
| | | if (!(slug?.startsWith("tags/") || slug === "tags")) { |
| | | throw new Error(`Component "TagContent" tried to render a non-tag page: ${slug}`) |
| | | } |
| | | |
| | |
| | | return ( |
| | | <div> |
| | | <h2> |
| | | <a class="internal tag-link" href={`./tags/${tag}`}> |
| | | <a class="internal tag-link" href={`./${joinSegments("tags", tag)}`}> |
| | | #{tag} |
| | | </a> |
| | | </h2> |