-
Because we are one week away from Learn Eleventy From Scratch launching, I’m going to share a quick Eleventy tip with, every day this week. We’ll call them Andy’s Eleventy Tip Of The Day™. swop.link/aetotd 🧵 I’ll pop them in this thread 👇
-
…in reply to @piccalilli_
Andy’s Eleventy Tip Of The Day™ #1: You don’t even need to install Eleventy locally. Here’s a one-liner to run in your terminal: echo "Hello, world" > index.md && npx @11ty/eleventy --serve Fire up your browser at localhost:8080 and you’ll see this 👇
-
…in reply to @piccalilli_
Andy’s Eleventy Tip Of The Day™ #2: You can set Eleventy only process files that change using the --incremental flag. This is really handy for if say, you are writing a blog post. The command in full: eleventy --serve --incremental
-
…in reply to @piccalilli_
Andy’s Eleventy Tip Of The Day™ #3: You can use JavaScript as a data file. In this sample, the method grabs some remote content and returns it. Because it’s in
_data/media.js, we can access it like this {% for item in media %} … {% endfor %} gist: gist.github.com/hankchizljaw/59caf21e1d2a562844ccf876e8d2db61

