-
Notifications
You must be signed in to change notification settings - Fork 25
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
Ignore Front Matter #6
Comments
It looks like all lines of the front matter still get merged into one, so for example this test file … ---
layout: default
---
<h1 class="text-4xl mb-12"><%= resource.data.title %></h1>
<div class="mx-auto lg:mx-48 xl:mx-72 2xl:mx-96">
<%= yield %>
</div> … will be formatted correctly, except for the front matter: |
Maybe you tried with the installed version or one from master? Seems to be working here:
|
Your new changes from A improvement would be, to keep a blank line between the front matter and the actual eruby stuff, like in this or that example. Before: ---
layout: page
title: About
---
<p>This is the basic Bridgetown (BT) site template. You can find out more info about customizing your Bridgetown site, as well as basic Bridgetown usage documentation at [bridgetownrb.com](https://bridgetownrb.com/)</p> After: $ erb-format src/about.erb --no-write ---
layout: page
title: About
---
<p>This is the basic Bridgetown (BT) site template. You can find out more info
about customizing your Bridgetown site, as well as basic Bridgetown usage
documentation at [bridgetownrb.com](https://bridgetownrb.com/)</p> One other thing, since I couldn't find anything in the docs: The max line length can only be set indirectly via |
Does #13 solve? |
Pushed an update that will add an extra newline, good call 👍 |
Newline-update works as expected 👌 Would be cool if one could disable forced line breaks altogether via #13. I'm on the road now with a smaller screen and those newlines can mess things up: |
Static site generators like Bridgetown or Middleman, usually utilize some kinds of Front Matter, like
Unfortunately
erb-format
will convert it to this, which doesn't work anymore:Using a hash based syntax almost works …
but will also get destroyed upon formating:
Is there any known workaround for this problem, like the
# rubocop:disable all
comment, which can be added to enclose lines that should be ignored? Would be happy to add this info to the README, if requested.The text was updated successfully, but these errors were encountered: