Skip to content

Add support for Frontmatter #389

Description

@jlangeveld

Plugin Version

v2.1.0

Prettier Version

v2.6.2

Which frameworks are affected?

  • none
  • vue
  • angular
  • svelte

Node Version

v18.3.0

Which operating systems have you used?

  • Linux
  • macOS
  • Windows

Prettier config

{

}

Input

---
title: Hello world
---
doctype
html
  head
    title= title
  body
    h1 Hello world

Output or Error

- --
title: Hello world
- --
doctype
html
  head
    title= title
  body
    h1 Hello world

Expected Output

---
title: Hello world
---
doctype
html
  head
    title= title
  body
    h1 Hello world

Additional Context

This makes pug templates unusable in frameworks like eleventy, which parse and use the frontmatter keys.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

type: feature requestFunctionality that introduces a new feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions