RubyFlow The Ruby and Rails community linklog

DRY up your structured plain-text files with ERB

I had a huge Markdown file (used to generate a presentation) that had many repeated elements. It was getting hard to keep those repeated elements consistent. So I slapped a method to output the formatting I need in ERB tags directly within the file, threw an .erb extension on the file name, and used the “erb” command-line tool to render it. You can make managing your plain-text files easier, too, with the details in this blog post!

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in