Skip to content

[codex] Fix legacy post table of contents - #262

Merged
YoonKeumJae merged 1 commit into
developfrom
codex/investigate-post-toc-legacy-content
Jun 19, 2026
Merged

[codex] Fix legacy post table of contents#262
YoonKeumJae merged 1 commit into
developfrom
codex/investigate-post-toc-legacy-content

Conversation

@YoonKeumJae

@YoonKeumJae YoonKeumJae commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Prepares post HTML before render by sanitizing and injecting heading IDs into the HTML string.
  • Reuses the prepared HTML for both post rendering and table-of-contents extraction.
  • Keeps the existing post-render enhancement path for media, links, and code blocks.

Root cause

Legacy post content had valid H1 elements from the API, but those headings could remain without IDs in the final rendered DOM. The TOC only includes headings with IDs, so affected pages showed only the post title.

Validation

  • Deployed this branch to Azure SWA test
  • Verified the OneNote calendar page shows the post title plus the three H1 entries in the TOC.
  • npm run lint
  • npm run build

Note: build still emits existing Vite dependency export and chunk-size warnings, but exits 0.

@YoonKeumJae
YoonKeumJae merged commit 4f0bd53 into develop Jun 19, 2026
@YoonKeumJae
YoonKeumJae deleted the codex/investigate-post-toc-legacy-content branch June 19, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant