Building a Table of Contents Component for a Phoenix Blog
2024-09-04
![]()
This article provides a step-by-step guide on how to build a table of contents component for a Phoenix blog. It covers how to configure the MDEx markdown parser to include IDs and anchor links for headings, and how to parse and convert the HTML headings into a suitable data structure using the Floki library. The guide also includes code examples and tests to validate the implementations.
Was this useful?