Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
0 answers
39 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 ...
Josh's user avatar
  • 1,429
0 votes
0 answers
118 views

Accessing the collections object and json data from a JavaScript file with Eleventy

I'm a very beginner in eleventy. And also in English! I'm studying alone. I have a html page gallery.html with a dropdown menu. I have a javascript file that will add some html content dynamically ...
Gaëlle Bono's user avatar
1 vote
1 answer
579 views

How to access json data file information from include file in 11ty / eleventy?

I need help with Eleventy (11ty), the static website generator. In the default _data/ directory I have the following navigation.json file: [ { "name":"Home", "url&...
Katja Eichelberger's user avatar
1 vote
1 answer
130 views

Eleventy and Netlify blog, with author relations

I have a blog type site that I've been working on, which is almost complete. I've used Eleventy and now I've hooked up Netlify CMS which required me to restructure some data. Netlify CMS requires me ...
Daz Lee's user avatar
  • 174
1 vote
2 answers
117 views

How to send form as json in 11ty

I'm trying to send data from 11ty to my directus headless CMS. The problem here is Directus only accepts json data. No problem to send the data with regular website, but as 11ty is a static site ...
Juan José Ruiz Muñoz's user avatar
3 votes
1 answer
1k views

Iterate over global data subfolder in Eleventy / 11ty

I'm using Eleventy and have created the subfolder yummy in my global data folder, that contains the following files: \src\_data\yummy\drinks.json \src\_data\yummy\food.json When I use {{ yummy | dump ...
Liu Kang's user avatar
  • 1,389
0 votes
1 answer
82 views

Nunjucks for loop running twice

I'm building a website using Nunjucks and Eleventy. I'm attempting to create an unordered list with a Nunjucks for loop (the data is stored in a JSON file). Everything appears to be working, except ...
user3701187's user avatar
0 votes
1 answer
80 views

What is wrong with this JSON, lint didn't work

{ "columnOne": [ { "displayText": "Login", "url": "/login" }, { "displayText": "Linkedin", &...
user avatar
0 votes
1 answer
362 views

Unable to loop through array when using 'eleventy-cache-assets'

In eleventy, I'm using the 'eleventy-cache-assets' utility to retrieve API data from TMDB and place it in a cache. The JSON is successfully retrieved and stored in the cache. I can also use the ...
FinallyCanuck's user avatar
0 votes
1 answer
183 views

When a data object references another data object, how to use in 11ty (or nunjucks)?

I have data objects that reference other data objects. For example: [ { "_id": "object A id", "key1": "value1", "linked": [ { "_id": "_object B id" } ... In ...
Jason's user avatar
  • 7,672
0 votes
2 answers
2k views

loop through a for statement using an if/else with nunjucks and json

I'm trying to loop through a nested json file with nunjucks, give each object type a specific layout and sort all based on date. So in my case I have two collections events and videos. Both ...
AENM's user avatar
  • 1
0 votes
1 answer
253 views

Show specific JSON values in a nunjuck template

Trying filter values from a JSON-file and showing in an nunjuck-template. This is the JSON-file: {"rows": [ {"value": { "name":"'s Gravenwezel", "zip":"2970" } }, { "...
Tuxy's user avatar
  • 91