Skip to content

Commit

Permalink
Add recent notes
Browse files Browse the repository at this point in the history
  • Loading branch information
zeyadetman committed Dec 9, 2023
1 parent 4e22fb3 commit 921bb95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quartz.layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const defaultContentPageLayout: PageLayout = {
}),
),
],
right: [Component.Graph(), Component.Backlinks()],
right: [Component.Graph(), Component.DesktopOnly(Component.RecentNotes({ limit: 3 }))],
}

// components for pages that display lists of pages (e.g. tags or folders)
Expand All @@ -52,6 +52,7 @@ export const defaultListPageLayout: PageLayout = {
),
],
right: [
Component.DesktopOnly(Component.RecentNotes({ limit: 5 })),
Component.MobileOnly(
Component.Explorer({
title: "All Notes",
Expand Down
2 changes: 2 additions & 0 deletions quartz/components/renderPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { JSResourceToScriptElement, StaticResources } from "../util/resources"
import { FullSlug, RelativeURL, joinSegments } from "../util/path"
import { visit } from "unist-util-visit"
import { Root, Element } from "hast"
import Backlinks from "./Backlinks"

interface RenderComponents {
head: QuartzComponent
Expand Down Expand Up @@ -138,6 +139,7 @@ export function renderPage(
</div>
</div>
<Content {...componentData} />
{Backlinks()(componentData)}
</div>
{RightComponent}
</Body>
Expand Down

0 comments on commit 921bb95

Please sign in to comment.