Skip to content

Support pug templates in markdown as a "tagged template literal" #1114

Closed as not planned
@shafdog

Description

@shafdog

Framework provides some helpful CSS for .card and .grid – which do fill in some gaps in Markdown. But using HTML does not help in reading what is still Markdown. i.e. XML is never going to be "pretty", but a lot going on in Framework's .md file already (data loaders, built-in templates, etc.).

I've used pug (well, jade) a bit in the early node days, and always liked the syntax. And thought it's indented structure might be better to "soften" any HTML needs within the markdown & seemed possible with the "fenced code blocks" syntax.

```pug
  .grid.grid-cols-2
    .card
      h1 Card 1
      | Column 1
    .card
      h1 Card 2
      | Column 2
``` //

I did look into Framework's code to see about adding ```pug myself. And may still. But in spelunking the source, while possible, the "tagged template literals" support had a few tentacles across the code. I suppose using a data loader with #!.../pug and including that in .md would also workaround the issue, but that seemed kinda wonky.

So filing this report since ability to extend the supported "tagged template literals" seems generally useful. Whether pug is good approach IDK ... but Markdown does not do a common grid-like pattern well & HTML tags really clutter up the Framework's Markdown.

The fenced ```js is really nice concept! So basically I'd rather add some custom "tagged template" code, to avoid needing inline HTML in more cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions