Skip to content

Slidev presentation files not well supported #41

Description

@jeduden

Description

Slidev (https://sli.dev) is a popular Markdown-based presentation framework. Slidev files use --- separators to split slides, which means a single .md file contains multiple independent "pages" — each with its own heading hierarchy, emphasis patterns, and structure.

MDSmith's default rules produce a large number of false positives on Slidev files because they assume a single continuous document.

Rules that clash with Slidev conventions

Rule Issue
heading-increment (MDS003) Each slide starts at #, sub-headings jump to ### — normal for slides
no-emphasis-as-heading (MDS018) Bold standalone lines are used for visual emphasis, not as heading replacements
no-trailing-punctuation-in-heading (MDS017) Slide headings often end with : or . for stylistic effect
first-line-heading (MDS004) Slidev front matter between --- means content doesn't start with a heading
no-duplicate-headings (MDS005) Repeated headings across slides (e.g. a title slide and closing slide)
heading-style (MDS002) Slidev ---layout: thank-you--- blocks get parsed as setext headings
blank-line-around-headings (MDS013) Slidev layout front matter blocks interfere
empty-section-body (MDS030) Layout-only slides have no body content

A default mdsmith check on a typical Slidev deck produced 32 false positives on a 214-line file.

Current workaround

Disable all clashing rules via overrides in .mdsmith.yml:

overrides:
    - files: ["**/slides.md"]
      rules:
          first-line-heading: false
          heading-increment: false
          no-duplicate-headings: false
          no-emphasis-as-heading: false
          no-trailing-punctuation-in-heading: false
          empty-section-body: false
          heading-style: false
          blank-line-around-headings: false
          line-length:
              max: 120

Possible improvements

  • Detect Slidev front matter (theme:, Slidev-specific keys) and auto-adjust behavior
  • Treat --- slide separators as document boundaries, scoping rules per-slide
  • Add a built-in preset or profile for presentation-style markdown

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-thoughtIssue that needs more thinking impact and/or usefulness

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions