Skip to content

Add table of content generation support #64

@alakra

Description

@alakra

Summary

Generates a data structure that holds a TOC generated from a markdown file.

Details

This feature should provide:

  • adds new field to metadata when passed to a resource's build/3 function
  • adds anchors in generated content of the article to link the TOC to the headers

The data structure should be a nested keyword list:

[
  {"Header 1", "#header_1"},
  {"Header 2", "#header_2", [
    {"Header A", "#header_a"}
  ]}
]

This will always generate a toc key in the metadata. If you don't want it, just ignore it.

  1. The metadata will contain a "toc" key with the TOC datastructure.
  2. The markdown content will inject anchors automatically for every header.

Acceptance Criteria

  • Generates "toc" key in metadata
  • Generates anchors for all headers

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions