<dt><a href="{{ item.url }}">{{ item.data.title }}</a></dt>
<dd>
{% set tag = false %}
- {% if page.filePathStem === "/links" %}
+ {% if page.filePathStem === "/articles" %}
+ {% set tag = "" %}
+ {% elseif page.filePathStem === "/links" %}
{% if "livestream" in item.data.tags %}
{% set tag = "livestream" %}
{% elseif "podcast" in item.data.tags %}
+++ /dev/null
----
-layout: layouts/base.njk
----
-
-<h1>{{ title }}</h1>
-
-<details>
- <summary>Metadata</summary>
- <ul>
- <li>Published: <time datetime="{{ page.date | htmlDateString }}">{{ page.date | htmlDateString }}</time></li>
- <li>Description: {{ description }}</li>
- <li>Tags: {{ tags | reject("equalto", "articles") | sort | join(", ") }}</li>
- {%- if posse %}
- {%- include "components/posse.njk" %}
- {%- endif %}
- </ul>
-</details>
-
-<article>
- {{ content | safe }}
-</article>
+++ /dev/null
----
-layout: layouts/base.njk
----
-
-<h1><a href="{{ href }}">{{ title }}</a></h1>
-
-<details>
- <summary>Metadata</summary>
- <ul>
- <li>Published: <time datetime="{{ page.date | htmlDateString }}">{{ page.date | htmlDateString }}</time></li>
- <li>Description: {{ description }}</li>
- <li>Tags: {{ tags | reject("equalto", "links") | sort | join(", ") }}</li>
- {%- if posse %}
- {%- include "components/posse.njk" %}
- {%- endif %}
- </ul>
-</details>
-
-<article>
- {{ content | safe }}
-</article>
--- /dev/null
+---
+layout: layouts/base.njk
+---
+
+<h1>
+ {% if page.filePathStem | startsWith("/links") %}
+ <a href="{{ href }}">{{ title }}</a>
+ {% else %}
+ {{ title }}
+ {% endif %}
+</h1>
+
+<details>
+ <summary>Metadata</summary>
+ <ul>
+ <li>Published: <time datetime="{{ page.date | htmlDateString }}">{{ page.date | htmlDateString }}</time></li>
+ <li>
+ {% if page.filePathStem | startsWith("/reviews") %}
+ Rating:
+ {% else %}
+ Description:
+ {% endif %}
+ {{ description }}
+ </li>
+ <li>
+ Tags:
+ {% if page.filePathStem | startsWith("/articles") %}
+ {{ tags | reject("equalto", "articles") | sort | join(", ") }}
+ {% elseif page.filePathStem | startsWith("/links") %}
+ {{ tags | reject("equalto", "links") | sort | join(", ") }}
+ {% elseif page.filePathStem | startsWith("/reviews") %}
+ {{ tags | reject("equalto", "reviews") | sort | join(", ") }}
+ {% else %}
+ {{ tags | sort | join(", ") }}
+ {% endif %}
+ </li>
+ {%- if posse %}
+ {%- include "components/posse.njk" %}
+ {%- endif %}
+ </ul>
+</details>
+
+<article>
+ {{ content | safe }}
+</article>
+++ /dev/null
----
-layout: layouts/base.njk
----
-
-<h1>{{ title }}</h1>
-
-<details>
- <summary>Metadata</summary>
- <ul>
- <li>Published: <time datetime="{{ page.date | htmlDateString }}">{{ page.date | htmlDateString }}</time></li>
- <li>Rating: {{ description }}</li>
- <li>Tags: {{ tags | reject("equalto", "articles") | sort | join(", ") }}</li>
- {%- if posse %}
- {%- include "components/posse.njk" %}
- {%- endif %}
- </ul>
-</details>
-
-<article>
- {{ content | safe }}
-</article>
{
"tags": ["articles"],
- "layout": "layouts/article.njk",
+ "layout": "layouts/post.njk",
"permalink": "articles/{{ date | htmlDateString }}-{{ title | slugify }}/"
}
\ No newline at end of file
{
"tags": ["links"],
- "layout": "layouts/link.njk",
+ "layout": "layouts/post.njk",
"permalink": "links/{{ date | htmlDateString }}-{{ title | slugify }}/"
}
\ No newline at end of file
{
"tags": ["reviews"],
- "layout": "layouts/review.njk",
+ "layout": "layouts/post.njk",
"permalink": "reviews/{{ date | htmlDateString }}-{{ title | slugify }}/"
}
\ No newline at end of file
eleventyConfig.addFilter("min", (...numbers) => {
return Math.min.apply(null, numbers);
});
+ eleventyConfig.addFilter("startsWith", (str, prefix) => {
+ return str.startsWith(prefix);
+ });
eleventyConfig.addPairedShortcode(
"callout",
function (content, level = "", format = "md", customLabel = "") {