Skip to content

v0.1.2-toc-footnotes(hot-fix)

Choose a tag to compare

@amitdevx amitdevx released this 28 Jun 09:39
· 30 commits to main since this release

Release v0.1.2 - Document Structure & Metadata

This release introduces new features for document structure and metadata handling, focusing on Table of Contents generation, PDF metadata injection, and GFM footnotes support.

Key Features

Table of Contents Generation

  • Generates hyperlinked Table of Contents via --toc CLI flag or toc: true API configuration.
  • Configurable heading depth using --toc-depth and custom section titles via --toc-title.
  • Automatically assigns stable, URL-safe ID anchors to all headings (h1h6) using rehype-slug.

YAML Frontmatter & PDF Metadata

  • Integrates gray-matter for parsing YAML frontmatter.
  • Utilizes pdf-lib to inject frontmatter properties (title, author, subject, keywords) directly into the final PDF document metadata.
  • Files containing publish: false in frontmatter are correctly ignored.

Footnotes Support

  • Natively supports GitHub Flavored Markdown (GFM) footnotes with bidirectional backlinks.
  • Restyled footnote definitions to appear accurately at the document base with a smaller font and standard separator line.

Developer & Internal Improvements

  • Extended ConvertOptions and ConvertResult API interfaces with toc configurations and PdfMetadata overrides.
  • Added custom AST plugin (rehypeToc) for robust TOC generation.
  • Added new visual Golden Document fixtures (toc.md, metadata.md, footnotes.md) to the regression test suite.

Full Changelog: v0.1.1...v0.1.2