title: How do I chain if statements in Jekyll?
body: <p>I am using a logic operator in Jekyll but it's not working.</p>
  
  <p>Page one, two and three all use the same layout (part of a multilingual solution, works good but requires logical loops for some layout control to keep things DRY.)</p>
  
  <p>Here's the code:</p>
  
  <pre><code>{% if page.type == "post" %}
  {% include post.html %}
  {% elseif page.class == "contact" %}
  {% include contact.html %}
  {% else %}
  {{ content }}
  {% endif %}
  </code></pre>
  
  <p>If I break it down to just an <code>else</code> and an <code>if else</code> setup, with any two of the tree, everything works. But as soon as I use a third condition it breaks. Am I limited to two conditionals with Jekyll? I can potentially restructure to make a <code>case</code> operator applicable, but I'd prefer to understand the fundamental problem here. Thanks all.</p>