rename ads -> offers, add new listing (syd)
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
|
|
||||||
export default function(eleventyConfig) {
|
export default function(eleventyConfig) {
|
||||||
|
/* Filter by date */
|
||||||
eleventyConfig.addFilter("filterByDate", (listings, date) => {
|
eleventyConfig.addFilter("filterByDate", (listings, date) => {
|
||||||
date = DateTime.fromISO(date, { zone: "utc" });
|
date = DateTime.fromISO(date, { zone: "utc" });
|
||||||
return listings.filter((listing) => {
|
return listings.filter((listing) => {
|
||||||
@ -9,12 +10,17 @@ export default function(eleventyConfig) {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/* Filter by tag */
|
||||||
|
eleventyConfig.addFilter("filterByTag", (listings, tag) => {
|
||||||
|
return listings.filter(listing => listing.data.tags.includes(tag));
|
||||||
|
});
|
||||||
|
|
||||||
// Return the keys used in an object
|
// Return the keys used in an object
|
||||||
eleventyConfig.addFilter("getKeys", target => {
|
eleventyConfig.addFilter("getKeys", target => {
|
||||||
return Object.keys(target);
|
return Object.keys(target);
|
||||||
});
|
});
|
||||||
|
|
||||||
/* */
|
/* Taglines for each category */
|
||||||
eleventyConfig.addFilter("getTagline", tag => {
|
eleventyConfig.addFilter("getTagline", tag => {
|
||||||
let tagline;
|
let tagline;
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
@ -68,7 +74,7 @@ export default function(eleventyConfig) {
|
|||||||
|
|
||||||
/* Filter out structural tags */
|
/* Filter out structural tags */
|
||||||
eleventyConfig.addFilter("removeCoreTags", (tags) => {
|
eleventyConfig.addFilter("removeCoreTags", (tags) => {
|
||||||
return tags.filter(tag => ["all", "ads", "daily"].indexOf(tag) === -1);
|
return tags.filter(tag => ["all", "daily", "offers", "requests"].indexOf(tag) === -1);
|
||||||
});
|
});
|
||||||
|
|
||||||
/* What it says on the tin */
|
/* What it says on the tin */
|
||||||
|
|||||||
@ -21,10 +21,11 @@ title: FediLearns Classifieds
|
|||||||
<h2>{{ tag }}</h2>
|
<h2>{{ tag }}</h2>
|
||||||
<p>{{ tag | getTagline }}</p>
|
<p>{{ tag | getTagline }}</p>
|
||||||
</div>
|
</div>
|
||||||
{% if collections[tag].length == 0 %}
|
{% set listings = collections[tag] | filterByTag("offers") %}
|
||||||
|
{% if listings | length == 0 %}
|
||||||
<p>No listings.</p>
|
<p>No listings.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for listing in collections[tag] | sortAlphabeticallyByTitle %}
|
{% for listing in listings | sortAlphabeticallyByTitle %}
|
||||||
{% include "listing.njk" %}
|
{% include "listing.njk" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
8
src/offers/holothuroid-rollenspiel-social.md
Normal file
8
src/offers/holothuroid-rollenspiel-social.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
title:
|
||||||
|
handle: "@holothuroid@rollenspiel.social"
|
||||||
|
url: "rollenspiel.social/@holothuroid"
|
||||||
|
blurb:
|
||||||
|
rate:
|
||||||
|
date:
|
||||||
|
---
|
||||||
8
src/offers/interpersonal-and-life/syd-pagan-plus.md
Normal file
8
src/offers/interpersonal-and-life/syd-pagan-plus.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: "Reading Tarot for Personal Introspection"
|
||||||
|
handle: "@syd@pagan.plus"
|
||||||
|
url: "pagan.plus/@syd"
|
||||||
|
blurb: "Interested in tarot? Have a deck you don't know what to do with? I can talk you through the basics of reading tarot for personal insight, including the tarot journaling practice I used to learn the card meanings and a simple three card spread for routine readings."
|
||||||
|
rate:
|
||||||
|
date: 2026-05-06
|
||||||
|
---
|
||||||
@ -1,6 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
permalink: false,
|
permalink: false,
|
||||||
tags: [
|
tags: [
|
||||||
"ads"
|
"offers"
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user