Skip to content

Commit

Permalink
fix: only one h1 on a page (closes #1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Aug 6, 2024
1 parent ca3943b commit 407fad3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion quartz/components/Explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default ((userOpts?: Partial<Options>) => {
data-savestate={opts.useSavedState}
data-tree={jsonTree}
>
<h1>{opts.title ?? i18n(cfg.locale).components.explorer.title}</h1>
<h2>{opts.title ?? i18n(cfg.locale).components.explorer.title}</h2>
<svg
xmlns="http://www.w3.org/2000/svg"
width="14"
Expand Down
5 changes: 3 additions & 2 deletions quartz/components/PageTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ const PageTitle: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzCompo
const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title
const baseDir = pathToRoot(fileData.slug!)
return (
<h1 class={classNames(displayClass, "page-title")}>
<h2 class={classNames(displayClass, "page-title")}>
<a href={baseDir}>{title}</a>
</h1>
</h2>
)
}

PageTitle.css = `
.page-title {
font-size: 1.75rem;
margin: 0;
}
`
Expand Down
2 changes: 1 addition & 1 deletion quartz/components/styles/explorer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ button#explorer {
display: flex;
align-items: center;

& h1 {
& h2 {
font-size: 1rem;
display: inline-block;
margin: 0;
Expand Down

0 comments on commit 407fad3

Please sign in to comment.