Questions tagged [eleventy]

Eleventy (11ty) is a static site generator. Use this tag for questions about the generator itself or about the usage of it.

Eleventy is a Node.js-based static site generator. It is template/framework-agnostic, works with multiple template languages, from Markdown to Liquid, or just JavaScript.

  • Good performance
  • Templating engine-independent
  • Framework-agnostic, no JavaScript runtime
  • Layout inheritance
  • Shortcodes
  • Custom 'filter' to modify content in multiple template engines
  • Generate pages from static JSON files

Find out more at 11ty.dev.


Resources

Competitors

261 questions
0
votes
0 answers

(eleventy) How to generate rel="amphtml" formats for src *.md file

I am trying to find a solution for generating an AMP version for particular pages in my 11ty (Eleventy) website. Take for example the following content ... | +- /src | +- /recipes | +- super-stroodle.md Ideally I would like…
ra9r
  • 4,528
  • 4
  • 42
  • 52
0
votes
1 answer

Eleventy is not adding an html suffix to index files generated from a nested index.md file

Eleventy is not adding an html suffix to index files generated from a nested index.md file. For example, here is a sample directory structure with my source content ... | +- /src (input dir) | +- post | | | +- my-cool-post | …
ra9r
  • 4,528
  • 4
  • 42
  • 52
0
votes
1 answer

eleventy: generating each category in a permalink for sitemap

i use Skeleventy to generate my static site. Njk template there uses collections.all to generate sitemap for all possible pages, like so --- permalink: sitemap.xml hidden: true ---
0
votes
1 answer

Eleventy: Output subset of data in collection

I have a products collection, from which I wish to output a carousel of images. My front matter includes the following… --- carousel: - image: '/assets/img/img.jpg' imageAlt: 'text' - image: '/assets/img/img-02.jpg' imageAlt: 'text' -…
Grant Smith
  • 321
  • 2
  • 15
0
votes
0 answers

Problems extending eleventy base template

// .eleventy.js configuration file module.exports = function(eleventyConfig) { eleventyConfig.addPassthroughCopy("_src/assets"); return { dir: { includes: "_templates", input: "_src", …
0
votes
1 answer

Gulp-CSS-Clean implicitly has an 'any' type

Trying to locally run a new Eleventy website on Windows. The same codebase works on other folks' computers, yet I can't launch it due to a 'missing' CSS file. [4] `TemplateWriterWriteError` was thrown [4] > (./src/_includes/layouts/about.html) [4] …
christo
  • 127
  • 1
  • 2
  • 12
0
votes
1 answer

Why does my service worker cache pages even if I disable it?

I develop the static website francoscarpa.com using Eleventy. This website uses a service worker to provide offline capabilities to the user. All my pages are rendered through this template: ... …
Pine Code
  • 2,466
  • 3
  • 18
  • 43
0
votes
1 answer

how to display all post tags for each item in a collection?

In the .eleventy.js file, I created a getFilteredByGlob collection for all .md files in my posts directory. Then for each item in that collection, I'm writing out values from the front matter of each .md file. This works well, but I'm struggling…
user45220
  • 61
  • 1
  • 4
0
votes
1 answer

Is it Possible common header/footer for all web pages using with static site generater

We have worked on a static site. we have used the javascript client-side and HTML. I am a beginner to jam-stack and static site generators. we have common code for all pages i.e header and footer related code. How can I use common header/footer for…
Raju Gaddam
  • 128
  • 3
  • 14
0
votes
1 answer

issue with eleventy nunjucks exporting template code

any ideas why my configuration is exporting njk code instead of content? {{ content | safe }} { % include 'footer.njk'…
ChatGPT
  • 5,334
  • 12
  • 50
  • 69
0
votes
1 answer

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 javascript, I would do something like an ES6 find(),…
Jason
  • 7,612
  • 14
  • 77
  • 127
0
votes
1 answer

The background image twitches before downloading to the host. How can I get rid of this?

I hosted my static site, generated by 11ty on Heroku. Everything is ok, but one thing - background image isnt loaded properly, as I said in the title, it twitches. The image is downloaded, I dont use links. The image is of size 895,4 kB. Can someone…
Denys Ivanenko
  • 388
  • 7
  • 21
0
votes
0 answers

Return a random value to data in field value is blank

I'm working on a redirect generator using 11ty and netlify-cms, and storing data in a shorturls.json file. My config.yml looks like this: collections: - name: "config" label: "Admin" description: "Administer site settings" create:…
Matt
  • 806
  • 3
  • 12
  • 32
0
votes
2 answers

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 collections will have an array of events and videos. My…
AENM
  • 1
  • 1
0
votes
0 answers

What is the recommended way of getting the latest updates from upstream eleventy-base-blog into my forked blog?

I have a blog based on a clone of the eleventy-base-blog repo. When I cloned it, I left the original code untouched in the master branch, and have made all my customisations and content changes in my own blog branch (so I could easily start from…
Francis Barton
  • 129
  • 2
  • 16
1 2 3
17
18