Skip to content

Commit

Permalink
Quartz sync: Sep 9, 2024, 3:07 AM
Browse files Browse the repository at this point in the history
  • Loading branch information
warren committed Sep 9, 2024
1 parent 49535ac commit 8699203
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
13 changes: 7 additions & 6 deletions quartz/components/ArticleTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } fro
import { classNames } from "../util/lang"

const ArticleTitle: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => {
const title = fileData.frontmatter?.title
if (title) {
return <h1 class={classNames(displayClass, "article-title")}>{title}</h1>
} else {
return null
}
return null
// const title = fileData.frontmatter?.title
// if (title) {
// return <h1 class={classNames(displayClass, "article-title")}>{title}</h1>
// } else {
// return null
// }
}

ArticleTitle.css = `
Expand Down
41 changes: 21 additions & 20 deletions quartz/components/TagList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } fro
import { classNames } from "../util/lang"

const TagList: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => {
const tags = fileData.frontmatter?.tags
const baseDir = pathToRoot(fileData.slug!)
if (tags && tags.length > 0) {
return (
<ul class={classNames(displayClass, "tags")}>
{tags.map((tag) => {
const linkDest = baseDir + `/tags/${slugTag(tag)}`
return (
<li>
<a href={linkDest} class="internal tag-link">
{tag}
</a>
</li>
)
})}
</ul>
)
} else {
return null
}
return null
// const tags = fileData.frontmatter?.tags
// const baseDir = pathToRoot(fileData.slug!)
// if (tags && tags.length > 0) {
// return (
// <ul class={classNames(displayClass, "tags")}>
// {tags.map((tag) => {
// const linkDest = baseDir + `/tags/${slugTag(tag)}`
// return (
// <li>
// <a href={linkDest} class="internal tag-link">
// {tag}
// </a>
// </li>
// )
// })}
// </ul>
// )
// } else {
// return null
// }
}

TagList.css = `
Expand Down

0 comments on commit 8699203

Please sign in to comment.