Skip to content

Commit e453717

Browse files
Completed Blogs Page which is able to show all the pattern blog page with Table of Contents
1 parent 0c0852f commit e453717

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

quartz/components/pages/Blogs.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ import styles from "../styles/blogs.scss"
44
// @ts-ignore
55
import script from "../scripts/blogpatterns.inline"
66

7-
interface Options {
8-
links: Record<string, string>
9-
components: QuartzComponent[]
10-
}
11-
12-
export default ((opts?: Options) => {
7+
export default (() => {
138
const Blogs: QuartzComponent = (props: QuartzComponentProps) => {
149
/**
1510
* Sorts all files in descending order based on their creation date.
@@ -56,7 +51,7 @@ export default ((opts?: Options) => {
5651
<ul class="overflow">
5752
{data.toc?.map((tocEntry) => (
5853
<li key={tocEntry.slug} class={`depth-${tocEntry.depth}`}>
59-
<a href={`#${tocEntry.slug}`} data-for={tocEntry.slug}>
54+
<a href={`${data.slug}#${tocEntry.slug}`} data-for={tocEntry.slug}>
6055
{tocEntry.text}
6156
</a>
6257
</li>

0 commit comments

Comments
 (0)