284 questions
0
votes
1
answer
101
views
Eleventy image output location
I have an existing set of markdown files that include images from the same input directory like so:
# This is posts/foo.md

Both foo.md and foo.png are in the posts/ directory ...
1
vote
1
answer
62
views
How to add further info (desc, image, date) to a tag list in Eleventy
I'm working on a portfolio using Eleventy,
I've created a pagination for the tags with the following code
---
pagination:
data: collections
size: 1
alias: tag
addAllPagesToCollections: ...
0
votes
0
answers
27
views
Using one JSON file as a data source for two templates in Eleventy
In Eleventy, I've got a global data source called meat.json.
It contains information about the meat and poultry section of an online supermarket, as well as a selection of products.
There's a template ...
1
vote
1
answer
42
views
Get file length for rss.xml enclosure tag in Eleventy
I have the following RSS feed in Eleventy v3.1.1. I wish to add the tag so I can include the featured image in the feed. The tag requires the length of the file in bytes. There are numerous ways to ...
0
votes
1
answer
104
views
How to use 11ty's Collections API and JS filter() to have custom tags and categories outside of the built-in tags key?
I have YAML 11ty front matter that looks like this:
---
date: 2024-07-16
eleventyComputed:
title: "Petra, ({{ date | fullDateToYear }})"
tags:
- lightboxItem
- gridItem
portCategories:...
1
vote
1
answer
56
views
Rendering a multi-level HTML list of links from a JSON file? (Accessing object grandchildren: 11ty, Nunjucks)
I have some JSON that looks like this (longer with more sections, but this is the jist of the structure):
{
"navTree": [
{
"lvl1Item": "Graphic Design&...
0
votes
0
answers
35
views
Can't access global data in paginated single item in Eleventy
I have a yaml data file at /src/_data/authors.yaml that includes a list of authors like this:
author-name:
full_name: First Last
display_name: Display Name
avatar: avatar.jpg
bio: "I am ...
0
votes
0
answers
20
views
Nested partials, css/script includes aren't loading in eleventy
I have a page that uses a partial and this partial loops through a collection "docs".
{% set itemList = collections.docs %}
{% include 'partials/details.njk' %}
I also have a gallery ...
0
votes
1
answer
88
views
Eleventy generated robots.txt is not valid in Lighthouse report
I'm using Eleventy with Netlify, and when running Lighthouse on my website, I get the error "robots.txt is not valid" / "Unknown directive". I've tried verifying in Google's robots....
0
votes
0
answers
14
views
Having trouble creating individual events pages from _data/events.json
I have an events.json file in my _data folder. It contains a list of events, grouped by date.
{
"2025-03-10": [
{
"slug": "confidence-building-training-...
1
vote
0
answers
22
views
11ty - Use nested data to build single collection item
I'm building a content-heavy portfolio site, where each blog post will have multiple sections with text, images, html etc. Putting all of this content into 1 markdown file per blog post would be messy ...
1
vote
0
answers
128
views
Eleventy pagination - how to create pages sorted by fields in a data collection
JSON or JS file in the eleventy _data folder of the form
{
ID: 149,
Year: '1901',
Last: 'Thompson',
First: 'Will',
Middle: ''
}
etc ...
creates a large eleventy collection
I am able to ...
0
votes
0
answers
78
views
npx and scoped packages
I'm trying to understand how this Node.js command works:
npx @11ty/eleventy
From what I understood, it looks like npx first goes into node_modules/@11ty/eleventy and finds the package.json file. More ...
1
vote
0
answers
88
views
Why are template strings in 11ty not rendering values from JSON content files?
I'm using 11ty to build a simple static site and have structured my project into templates and content directories. The template strings in my Nunjuck .njk templates are not rendering values from ...
0
votes
1
answer
189
views
How to display image from Strapi collection content
Im having trouble receiving the media attribute of my content in my collection from strapi on my 11ty project. Every time I try something with trying to recieve my image data it breaks my page.
Strapi ...