title: Custom Shortcode (Include, Tag) in Jekyll with Parameters and Multiline Text
body: <p>I'd like to create something like a shortcode in Jekyll for a blockquote which also states the source of the quote in a nicely formatted way.</p>
  <p>The shortcode could look something like this:</p>
  <pre><code>{% quote author=&quot;My Author&quot; %}
  This is the quote content
  spanning multiple lines
  
  And paragraphs
  {% endquote %}
  </code></pre>
  <p>What's the best way to achieve this in Jekyll?</p>
  <h1>My Research</h1>
  <p>I have found two systems in Jekyll that can be used similar to shortcodes:</p>
  <ul>
  <li><a href="https://jekyllrb.com/docs/includes/" rel="nofollow noreferrer">HTML Includes</a></li>
  <li><a href="https://jekyllrb.com/docs/plugins/tags/" rel="nofollow noreferrer">Custom Tags</a></li>
  </ul>
  <p>However, both of these systems seem to have limitations.</p>
  <h2>HTML Includes</h2>
  <p>An include in use looks like this:</p>
  <pre><code>{% include note.html content=download_note %}
  </code></pre>
  <p>It is possible to use content from captures for parameters, so we could create the following include file:</p>
  <pre><code>&lt;blockquote&gt;
      {{ include.quote | markdownify }}
      &lt;p&gt;&lt;em&gt;{{ include.author }}&lt;/em&gt;&lt;/p&gt;
  &lt;/blockquote&gt;
  </code></pre>
  <p>And use it in a blog post like this:</p>
  <pre><code>{% capture quote %}
  This is the quote content
  spanning multiple lines
  
  And paragraphs
  {% endcapture %}
  {% include quote.html quote=quote author=&quot;My Author&quot; %}
  </code></pre>
  <p>It works, but in my opinion it's not really a nice approach to use when writing blog posts.</p>
  <h2>Custom Tags</h2>
  <p>Tags sound very promising, but the documentation only shows two ways to use them:</p>
  <pre><code>{% render_time page rendered at: %}
  </code></pre>
  <p>and</p>
  <pre><code>{% render_time %}
  page rendered at:
  {% endrender_time %}
  </code></pre>
  <p>Both methods only provide a single attribute to the Ruby code, the <code>content</code>. And I have found a blog post that <a href="https://blog.sverrirs.com/2016/04/custom-jekyll-tags.html" rel="nofollow noreferrer">provides multiple attributes using string concatenation or JSON</a>. To me this sounds like there's really no way to provide multiple arguments to a jekyll tag plugin. Can this really be the case?</p>