Hide metadata

This commit is contained in:
Gal 2025-02-12 00:15:18 +01:00
parent 56c2d0455b
commit 9300e1a362
Signed by: gal
GPG Key ID: F035BC65003BC00B
4 changed files with 12 additions and 2 deletions

View File

@ -27,9 +27,7 @@ export const defaultContentPageLayout: PageLayout = {
Component.DesktopOnly(Component.Explorer()),
],
right: [
Component.Graph(),
Component.DesktopOnly(Component.TableOfContents()),
Component.Backlinks(),
],
}

View File

@ -1,6 +1,10 @@
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
function ArticleTitle({ fileData, displayClass }: QuartzComponentProps) {
if (fileData.frontmatter?.hide_title === true) {
return null
}
const title = fileData.frontmatter?.title
if (title) {
return <h1 class={`article-title ${displayClass ?? ""}`}>{title}</h1>

View File

@ -4,6 +4,10 @@ import readingTime from "reading-time"
export default (() => {
function ContentMetadata({ cfg, fileData, displayClass }: QuartzComponentProps) {
if (fileData.frontmatter?.hide_metadata === true) {
return null
}
const text = fileData.text
if (text) {
const segments: string[] = []

View File

@ -2,6 +2,10 @@ import { pathToRoot, slugTag } from "../util/path"
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
function TagList({ fileData, displayClass }: QuartzComponentProps) {
if (fileData.frontmatter?.hide_tags === true) {
return null
}
const tags = fileData.frontmatter?.tags
const baseDir = pathToRoot(fileData.slug!)
if (tags && tags.length > 0) {