Hide metadata
This commit is contained in:
parent
56c2d0455b
commit
9300e1a362
|
@ -27,9 +27,7 @@ export const defaultContentPageLayout: PageLayout = {
|
||||||
Component.DesktopOnly(Component.Explorer()),
|
Component.DesktopOnly(Component.Explorer()),
|
||||||
],
|
],
|
||||||
right: [
|
right: [
|
||||||
Component.Graph(),
|
|
||||||
Component.DesktopOnly(Component.TableOfContents()),
|
Component.DesktopOnly(Component.TableOfContents()),
|
||||||
Component.Backlinks(),
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||||
|
|
||||||
function ArticleTitle({ fileData, displayClass }: QuartzComponentProps) {
|
function ArticleTitle({ fileData, displayClass }: QuartzComponentProps) {
|
||||||
|
if (fileData.frontmatter?.hide_title === true) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
const title = fileData.frontmatter?.title
|
const title = fileData.frontmatter?.title
|
||||||
if (title) {
|
if (title) {
|
||||||
return <h1 class={`article-title ${displayClass ?? ""}`}>{title}</h1>
|
return <h1 class={`article-title ${displayClass ?? ""}`}>{title}</h1>
|
||||||
|
|
|
@ -4,6 +4,10 @@ import readingTime from "reading-time"
|
||||||
|
|
||||||
export default (() => {
|
export default (() => {
|
||||||
function ContentMetadata({ cfg, fileData, displayClass }: QuartzComponentProps) {
|
function ContentMetadata({ cfg, fileData, displayClass }: QuartzComponentProps) {
|
||||||
|
if (fileData.frontmatter?.hide_metadata === true) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
const text = fileData.text
|
const text = fileData.text
|
||||||
if (text) {
|
if (text) {
|
||||||
const segments: string[] = []
|
const segments: string[] = []
|
||||||
|
|
|
@ -2,6 +2,10 @@ import { pathToRoot, slugTag } from "../util/path"
|
||||||
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||||
|
|
||||||
function TagList({ fileData, displayClass }: QuartzComponentProps) {
|
function TagList({ fileData, displayClass }: QuartzComponentProps) {
|
||||||
|
if (fileData.frontmatter?.hide_tags === true) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
const tags = fileData.frontmatter?.tags
|
const tags = fileData.frontmatter?.tags
|
||||||
const baseDir = pathToRoot(fileData.slug!)
|
const baseDir = pathToRoot(fileData.slug!)
|
||||||
if (tags && tags.length > 0) {
|
if (tags && tags.length > 0) {
|
||||||
|
|
Loading…
Reference in New Issue