This commit refactors the `tiles.html` include file so that when the
`site.tiles-source` is pages, pages with `show_tile: false` set in their
Front Matter are not counted as having been shown. Prior to this commit,
such pages were iterated over in the `for` loop, consuming a loop
iteration from the `site.tiles-count` counter.
Put another way, say you have set `tiles-count` to 6, and you have a
total of 10 pages. Of these ten pages, six have `show_tile` set to
`false`. The natural expectation would be that the home page layout
would display four tiles (10 - 6 = 4), but in fact, the exact number of
page tiles shown would depend on the specific lexicographical ordering
of the `site.html_pages` array, which could result in fewer than four
page tiles being shown.
This commit fixes the issue by excluding pages with `show_tile` set to
`false` first, and only then iterating over the remaining pages.
This commit uses the Jekyll `link` tag to correctly construct the URL to
images with otherwise relative paths. Without this logic, the images
would only load when the landing page's permalink was not altered by the
user. For example, if the permalink is changed to `get-started` in the
Jekyll Front Matter, the relative URLs would become:
get-started/assets/images/pic08.jpg
However, since the `get-started` path doesn't really exist, this would
fail to load the image.
As of Jekyll 4.0, the `link` tag is safe to use without prepending
`site.baseurl`, so this code works in all situations.