--- pagination: data: collections.posts size: 1 alias: preview permalink: '/assets/img/social-preview/{{ preview.data.title | slugify }}-preview.svg' eleventyExcludeFromCollections: true --- {% assign titleInLines = preview.data.title | splitLines: 40 %} {% assign numberOfLines = titleInLines.length %} {% if numberOfLines == 1 %} {% assign verticalStartingPoint = 340 %} {% elsif numberOfLines == 2 %} {% assign verticalStartingPoint = 290 %} {% elsif numberOfLines == 3 %} {% assign verticalStartingPoint = 250 %} {% elsif numberOfLines == 4 %} {% assign verticalStartingPoint = 210 %} {% elsif numberOfLines == 5 %} {% assign verticalStartingPoint = 170 %} {% endif %} {{ preview.date | date: "%B %e, %Y" }} {% for line in titleInLines %} {% capture spacing %}{{ forloop.index0 | times: 50 }}{% endcapture %} {{ line }} {% endfor %}