diff --git a/.eleventy.js b/.eleventy.js index 4b9161b..1ef0d19 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -29,6 +29,10 @@ module.exports = function (eleventyConfig) { verbose: false }); + eleventyConfig.addFilter("dateString", (dateObj) => { + return new Date(dateObj).toISOString().split("T")[0]; + }); + eleventyConfig.addCollection("posts", async function (collection) { collection = await api.posts .browse({ @@ -52,7 +56,6 @@ module.exports = function (eleventyConfig) { // Bring featured post to the top of the list collection.sort((post, nextPost) => nextPost.featured - post.featured); - console.log(collection); return collection; }); } \ No newline at end of file diff --git a/_includes/layouts/default.njk b/_includes/layouts/default.njk index 90f3ed0..b97945e 100644 --- a/_includes/layouts/default.njk +++ b/_includes/layouts/default.njk @@ -12,6 +12,13 @@
+
+ +
{% block content %} {% endblock content %} diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index c2302dd..58f15ff 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -24,14 +24,12 @@ diff --git a/index.njk b/index.njk index f29e197..85af760 100644 --- a/index.njk +++ b/index.njk @@ -7,13 +7,6 @@ pagination: {% extends 'layouts/default.njk' %} {% block content %} {% set postslist = collections.posts %} -
- -
{% for post in postslist %}
@@ -24,7 +17,7 @@ pagination: {{ post.excerpt | safe }}
{% endfor %}