Eleventy v0.11.0: The Eponymous Release
v0.11.0 Documentation
Install or Upgrade
- Install to your local project:
npm install @11ty/eleventy
- Already installed in your local project? Upgrade your version:
npm update @11ty/eleventy
- Read more about local project versus global installation
How can you support Eleventy?
- ⭐️ Star us on GitHub!
- 🐦 Follow us on Twitter @eleven_ty!
- 🎁 Support us on Open Collective!
Thank you to everyone that contributed code, documentation, answered questions, filed issues, said a kind word on Twitter ❤️
The TL;DR List
Computed Data
Computed Data is a mechanism to transform the data at the end of the data cascade, before template rendering.
- Read more: https://www.11ty.dev/docs/data-computed/
- All the related issues: #481 #335 #1061 #1043 #1098 #1085 #1031 #1130 #973 #1114 #1138 #1069 #1137 Supersedes and deprecates old
renderData
feature (not removed yet): #942 #941 #289 #816 #912
Incremental Builds
- Incremental support for
--incremental
is ongoing. Follow along at https://github.com/orgs/11ty/projects/3 - This version supports incremental passthrough copy. Changing a passthrough copy file during
--watch
or--serve
only copies the changed file and does not trigger a full build. #977
Shortcodes
- In shortcodes you can now access page variable data under
this.page
without needing to pass in as an argument (works with Nunjucks, Liquid, 11ty.js JavaScript, Handlebars) #741
The Road to ESM
- Adds support for
*.11ty.cjs
files (same as*.11ty.js
files)—thanks @justinfagnani! #826 #827- Can use
.cjs
in config file, template/directory/global data files—thanks @gloryofrobots! #837 #848
- Can use
New Filters
- Filters to retrieve next/previous items in collections. Thanks @pascalw! #529 #819 #983
- Adds new
log
filter for easy console.log from inside templates. #929
The Nitty Gritty List™
- Adds
.npmignore
to streamline npm payload—thanks @pdehaan! #951 #962 - Adds additional performance-related debug messages to help developers analyze and improve performance of builds: https://www.11ty.dev/docs/debug-performance/ #1078
- Make the priority of different file extensions explicit in Global Data—thanks @gloryofrobots! #794 #821
- Now parses a directory data file in the top level input directory. #935 #993
- Support for cooldown period between builds during watch/serve. Adds Configuration API method
setWatchThrottleWaitTime
to set (in milliseconds). Useful if you use a Save All feature in your editor that saves multiple files at the same time. #559 Related to #977 Docs forthcoming: #1003 - Adds
beforeWatch
build event (runs before a re-build during watch or serve, not the initial build) #1042 - To discourage huge passthrough copy in the build, we now show the number of files copied in console log output #1077
- Markdown templates (and thus markdown-it plugins) can receive and use data—thanks @blacksquaresa! #643
- Throw an error if an 11ty.js JavaScript template doesn’t return anything! Thanks @ithinkihaveacat #1013 #1012
- Retrieve a reference to existing Eleventy provided filters in with Configuration API method
getFilter
, docs pending #284
Bug fixes
- Fail silently on empty/null dates in front matter—thanks @DirtyF @dceddia! #850 #786
- Copy improvements in comments/code style cleanup—thanks @samuelpath! #960 #970 #968 #992 #991 #987
- Fix for errors being swallowed in the Error Handler 😭, reporting as
Cannot read property 'trim' of undefined
- A ton of bug fixes for
renderData
(details above in the Computed Data section) npm audit
: #1023 #1026 #1025
Administration
- Issues fixed in v0.11.0 Milestone
- All code changes from v0.10.0 to v0.11.0
- Code coverage stats for v0.11.0
Dependency Major Release Bumps
markdown-it
from v8.4.2 to v10.0.0. Read more: https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md