Merged
Conversation
ghost
force-pushed
the
toc-tree
branch
2 times, most recently
from
February 29, 2024 11:24
7a729db to
0c5888c
Compare
ghost
force-pushed
the
toc-tree
branch
2 times, most recently
from
June 10, 2026 09:45
ec875fa to
28ab91a
Compare
ghost
marked this pull request as ready for review
June 10, 2026 09:52
ghost
self-requested a review
June 10, 2026 09:52
ghost
requested a review
from Copilot
June 11, 2026 08:57
There was a problem hiding this comment.
Pull request overview
This PR implements a collapsible/nested Table of Contents for blog posts by converting the markdown heading list into a hierarchy and rendering it with a new recursive TOC component.
Changes:
- Update
getTableOfContent()to build a nested heading tree instead of returning a flat list. - Add a new recursive
TOC.vuecomponent to render collapsible heading sections and handle smooth scrolling. - Replace the old flat TOC rendering in
ContentSidebar.vuewith the newTOCcomponent.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/helpers/markdown.js |
Builds a hierarchical TOC structure from markdown heading tokens. |
src/components/detail/TOC.vue |
New recursive, collapsible TOC renderer with scroll-to-heading behavior. |
src/components/detail/ContentSidebar.vue |
Switches sidebar TOC rendering to use the new TOC component. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot stopped work on behalf of
ghost due to an error
June 11, 2026 09:34
ghost
requested a review
from Copilot
June 11, 2026 09:35
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
src/components/detail/ContentSidebar.vue:30
tocis validated as a requiredArray, but it can benullduring initial render (the post view initializestocasref(null)until the markdown is loaded). This triggers Vue prop validation warnings and is avoidable by providing a default[].
defineProps({
toc: {
type: Array,
required: true
},
ghost
force-pushed
the
toc-tree
branch
2 times, most recently
from
June 12, 2026 08:41
310dc9c to
601b823
Compare
ghost
requested a review
from PrajwolAmatya
June 12, 2026 08:42
individual-it
approved these changes
Jun 15, 2026
Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> fix(TOC): add name option, rename class to toc--item for sidebar styling
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


fixes: #88