Hide metadata
This commit is contained in:
parent
56c2d0455b
commit
9300e1a362
|
@ -27,9 +27,7 @@ export const defaultContentPageLayout: PageLayout = {
|
|||
Component.DesktopOnly(Component.Explorer()),
|
||||
],
|
||||
right: [
|
||||
Component.Graph(),
|
||||
Component.DesktopOnly(Component.TableOfContents()),
|
||||
Component.Backlinks(),
|
||||
],
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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[] = []
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue