Skip to content

tag specific description/data for a tag "series" listing page #3033

Answered by pdehaan
thedamon asked this question in Q&A
Discussion options

You must be logged in to vote

Sounds like you want longer and more complex than multiline YAML content... In that case, I might drop a bunch of .md files in your ./src/_includes dir and name them after the tags and then use something like this with the EleventyRenderPlugin plugin:

{%- set pages = collections[tag.name] -%}
{%- set desc = "./src/_includes/" + tag.name + ".md" -%}

<header>
  <h1>{{ tag.name }}</h1>
  <div>{% renderFile desc %}</div>
</header>

And my ./src/_includes/dog.md file looks like this work of genius:

# DOGS

Dogs are rad.

They have fur and sometimes shed, but they poop outside.

![](/imgs/dog.webp)

And my updated eleventy.config.js has these tweaks:

+const { EleventyRenderPlugin } = require("@1…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@pdehaan
Comment options

pdehaan Sep 3, 2023
Collaborator

Answer selected by thedamon
@pdehaan
Comment options

pdehaan Sep 3, 2023
Collaborator

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pdehaan
Comment options

pdehaan Sep 16, 2023
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants