Skip to content

Bug: Frontmatter not removed in Markdown Readme #2381

@hrueger

Description

@hrueger

Search terms

markdown, frontmatter, readme

Expected Behavior

The markdown parser in typedoc (for readmes) removes any yaml frontmatter as it is just metadata and should not be displayed to the end-user.

Actual Behavior

YAML frontmatter is converted to html and shown. Example:

---
title: Vision
---

# SHIFTY - Vision

becomes
grafik

However, we should just see the headline and not title: Vision.

Steps to reproduce the bug

  1. Create a readme with YAML frontmatter (like above)
  2. Build the docs
  3. See the frontmatter contents in the generated docs

Environment

  • Typedoc version: 0.24.8
  • TypeScript version: 5.0.0
  • Node.js version: 18.17.1
  • OS: Windows & macOS

Additional Info

Happy to fix that in a PR. Should be as simple as removing frontmatter via regex before passing it to marked. Maybe this should be a new config option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions