Mitigate #171 by using js front matter type instead of YAML.

This commit is contained in:
Zach Leatherman
2024-09-11 16:34:56 -05:00
parent 4fad5c6888
commit 1ad494cfd2
6 changed files with 20 additions and 20 deletions

View File

@@ -1,8 +1,10 @@
---
eleventyNavigation:
key: Home
order: 1
numberOfLatestPostsToShow: 3
---js
const eleventyNavigation = {
key: "Home",
order: 1
};
const numberOfLatestPostsToShow = 3;
---
{% set postsCount = collections.posts | length %}
{% set latestPostsCount = postsCount | min(numberOfLatestPostsToShow) %}