Implement now burning

This commit is contained in:
2025-06-06 19:19:07 -05:00
parent 698fe4b7c6
commit 3871a05833
15 changed files with 277 additions and 15 deletions

View File

@ -4,6 +4,8 @@ title: Nathan Upchurch | Changelog
structuredData: none
---
# Changelog
* 2025-06-06
* Implement [/now-burning](/now-burning/) and [/once-burned](/once-burned/).
* 2025-04-19
* Improve post list image sizing on mobile.
* 2025-04-08

View File

@ -10,6 +10,7 @@ pagination:
- tagList
- gallery
- galleryImages
- nowBurning
addAllPagesToCollections: true
eleventyComputed:
title: “{{ tag }}”
@ -29,6 +30,7 @@ permalink: "/feeds/{{ tag | slugify }}.xml"
<email>{{ metadata.author.email }}</email>
</author>
{%- for post in postslist | reverse %}
{% if post.url %}
{% set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.url) }}{% endset %}
{% if post.data.imageURL %}{% set imageURL %}{{ post.data.imageURL | htmlBaseUrl(metadata.url) }}{% endset %}{% endif %}
{% set defaultImageURL %}{{ metadata.defaultPostImageURL | htmlBaseUrl(metadata.url) }}{% endset %}
@ -45,5 +47,6 @@ permalink: "/feeds/{{ tag | slugify }}.xml"
</image>
<content type="html">{{ post.templateContent | transformWithHtmlBase(absolutePostUrl, post.url) }}</content>
</entry>
{% endif %}
{%- endfor %}
</feed>

23
content/now-burning.njk Normal file
View File

@ -0,0 +1,23 @@
---
layout: layouts/base.njk
title: "Nathan Upchurch | Now Burning: What incense I'm burning at the moment."
structuredData: none
postlistHeaderText: "What I've been burning:"
---
{% set burning = collections.nowBurning | last %}
<h1>Now Burning:</h1>
<article class="post microblog-post">
<img class="microblog-icon" src="/img/censer.svg">
<div class="microblog-status">
<h2 class="">{{ burning.data.title }}, {{ burning.data.manufacturer }}<br>{{ burning.date | niceDate }}, {{ burning.data.time }}</h2>
{% if burning.content %}
<div class="microblog-comment">
{{ burning.content | safe }}
</div>
{% endif %}
</div>
</article>
<a href="/once-burned/">
<button type="button">Previous Entries »</button>
</a>

View File

@ -0,0 +1,7 @@
---
title: "Moss Garden (Nokiba)"
manufacturer: "Shoyeido"
date: 2025-06-06
time: 7:12 PM
---
Love this stick. Absolute classic.

View File

@ -0,0 +1,5 @@
export default {
tags: ["nowBurning"],
layout: "layouts/base.njk",
permalink: false,
};

View File

@ -1,6 +1,4 @@
export default {
tags: [
"now"
],
"layout": "layouts/post.njk",
tags: ["now"],
permalink: false,
};

View File

@ -0,0 +1,19 @@
---
layout: layouts/base.njk
title: "Nathan Upchurch | Once Burned: Incense I've burning in the past."
structuredData: none
---
{% set burning = collections.nowBurning | last %}
<h1>Previous “Now Burning” Entries:</h1>
{% set postsCount = collections.nowBurning | removeMostRecent | length %}
{% if postsCount > 1 %}
{% set postslist = collections.nowBurning | removeMostRecent %}
{% set showPostListHeader = false %}
{% include "incenseList.njk" %}
{% else %}
<p>Nothings here yet!</p>
{% endif %}
<a href="/now-burning/">
<button type="button">Latest »</button>
</a>

View File

@ -5,10 +5,12 @@ eleventyExcludeFromCollections: true
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{%- for page in collections.all %}
{% set absoluteUrl %}{{ page.url | htmlBaseUrl(metadata.url) }}{% endset %}
<url>
<loc>{{ absoluteUrl }}</loc>
<lastmod>{{ page.date | htmlDateString }}</lastmod>
</url>
{% if page.url %}
{% set absoluteUrl %}{{ page.url | htmlBaseUrl(metadata.url) }}{% endset %}
<url>
<loc>{{ absoluteUrl }}</loc>
<lastmod>{{ page.date | htmlDateString }}</lastmod>
</url>
{% endif %}
{%- endfor %}
</urlset>