<div class="outer_ingredients">
  <div id="ingredients">
    <div class="ingred-title">Ingrédients</div>

    {{ with .Params.portions -}}
    <div class="ingred-portions">
      pour {{ .qt | markdownify }}
      {{- with .name }} {{ . | markdownify }}
      {{- else }} portions{{ end -}}
    </div>
    {{- end }}

    <ul>
    {{ range $.Param "ingredients" }}
    <li>
      <span class="ingred-qt">{{ with .qt }}{{ . | markdownify }}{{ end }}</span>
      {{ with .article -}}
      {{ . | markdownify -}}
      {{- if substr . -1 1 | eq "'" -}}{{ else }} {{ end -}}
      {{/* ^^^ No space only if article ends with an apostrophe */}}
      {{- end -}}
      <span class="ingred-name">{{ .name | markdownify }}</span>
    </li>
    {{ end }}
    </ul>
  </div>
</div>