Implement now burning
This commit is contained in:
@ -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
|
||||
|
@ -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
23
content/now-burning.njk
Normal 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>
|
7
content/now-burning/Now Burning_1.md
Normal file
7
content/now-burning/Now Burning_1.md
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: "Moss Garden (Nokiba)"
|
||||
manufacturer: "Shoyeido"
|
||||
date: 2025-06-06
|
||||
time: 7:12 PM
|
||||
---
|
||||
Love this stick. Absolute classic.
|
5
content/now-burning/now-burning.11tydata.js
Normal file
5
content/now-burning/now-burning.11tydata.js
Normal file
@ -0,0 +1,5 @@
|
||||
export default {
|
||||
tags: ["nowBurning"],
|
||||
layout: "layouts/base.njk",
|
||||
permalink: false,
|
||||
};
|
@ -1,6 +1,4 @@
|
||||
export default {
|
||||
tags: [
|
||||
"now"
|
||||
],
|
||||
"layout": "layouts/post.njk",
|
||||
tags: ["now"],
|
||||
permalink: false,
|
||||
};
|
||||
|
19
content/once-burned/index.njk
Normal file
19
content/once-burned/index.njk
Normal 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>Nothing’s here yet!</p>
|
||||
{% endif %}
|
||||
<a href="/now-burning/">
|
||||
<button type="button">Latest »</button>
|
||||
</a>
|
@ -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>
|
||||
|
Reference in New Issue
Block a user