Give blog posts an optional table of contents
Blog posts -> Show contents (migration 043, off by default): with two or more headings, the post's headings sit in a sticky column beside it with the one being read lit (an IntersectionObserver, not a scroll listener), and fold out at the top on phones. Content-block headings now carry anchor ids, so a link can point at one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f59ab314e0
commit
92e7938b64
10 changed files with 264 additions and 44 deletions
|
|
@ -25,6 +25,8 @@ export type BlogPostRecord = {
|
|||
excerpt?: string | null
|
||||
cover_image?: string | null
|
||||
cover_alt?: string | null
|
||||
/** List the post's headings beside it. */
|
||||
show_contents?: boolean
|
||||
published_on?: string | null
|
||||
tags: string[]
|
||||
authors: BlogAuthor[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue