This reverts commit 7438fca363
.
This commit is contained in:
parent
7438fca363
commit
f5c1ce115f
@ -4,19 +4,14 @@ import { classNames } from "../util/lang"
|
||||
|
||||
const TagList: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => {
|
||||
const tags = fileData.frontmatter?.tags
|
||||
const enableTags = fileData.frontmatter?.enableTags ?? true
|
||||
const baseDir = pathToRoot(fileData.slug!)
|
||||
|
||||
if (enableTags === false || !tags || tags.length === 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (tags && tags.length > 0) {
|
||||
return (
|
||||
<ul class={classNames(displayClass, "tags")}>
|
||||
{tags.map((tag) => {
|
||||
const linkDest = baseDir + `/tags/${slugTag(tag)}`
|
||||
return (
|
||||
<li key={tag}>
|
||||
<li>
|
||||
<a href={linkDest} class="internal tag-link">
|
||||
{tag}
|
||||
</a>
|
||||
@ -25,6 +20,9 @@ const TagList: QuartzComponent = ({ fileData, displayClass }: QuartzComponentPro
|
||||
})}
|
||||
</ul>
|
||||
)
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
TagList.css = `
|
||||
|
Loading…
Reference in New Issue
Block a user