--- 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: 36 %} {% assign numberOfLines = titleInLines.length %} {% if numberOfLines == 2 %} {% assign verticalStartingPoint = 250 %} {% elsif numberOfLines == 3 %} {% assign verticalStartingPoint = 210 %} {% elsif numberOfLines == 4 %} {% assign verticalStartingPoint = 170 %} {% elsif numberOfLines == 5 %} {% assign verticalStartingPoint = 130 %} {% else %} {% assign verticalStartingPoint = 290 %} {% endif %} {{ preview.date | dateToReadableDate}} {% for line in titleInLines %} {% capture spacing %}{{ forloop.index0 | times: 50 }}{% endcapture %} {{ line }} {% endfor %} {{ meta.siteName }} • {{ meta.url | replace: "https://", "" | replace: "http://", "" }}