Slim - Evanto/qna GitHub Wiki

Slim Docs

Markup examples

  • h1 - write text right after tags like h1, p
  • - for code that shouldn't be rendered
  • = to output code result, examples:
    h1= @question.title
    p= @question.body
  • == yield
  • .content is the same as div class="content" (just a div class)
  • =< - output with leading white space. Same as =, but =< adds a leading white space.
  • | - line indicator. The pipe tells Slim to just copy the line. It essentially escapes any processing. Each following line that is indented greater than the pipe is copied over.

1