Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Markdown extension #17

Open
sarahdayan opened this issue Jul 8, 2020 · 0 comments
Open

Create a Markdown extension #17

sarahdayan opened this issue Jul 8, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@sarahdayan
Copy link
Member

Description

A simplified markup language that lets you leverage Ruby functions and partials with a more Markdown-like syntax.

Motivation

We currently provide a way for users to mix different rendering languages. This is nice and should stay, but it would be even better to have a unified language that lets you leverage ERB with a Markdown-like syntax. This is more user friendly for writers, and allows you to lint content with tools like stylelint without having to write a custom parser.

Solution

We could extend Markdown to develop a few tags that let users leverage Ruby features without actually writing ERB.

For example:

# Before

<%= partial 'panel/table.haml', locals: {
  data: {
    'Group title': [
      {
        text: 'My title',
        link: '/path/to/page/'
      }
    ],
  }
} %>
// After

<panel-table groups="[{ text: 'My title', link: '/path/to/page/' }]" />
@sarahdayan sarahdayan added the enhancement New feature or request label Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant