This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Use this one-liner in your eleventy.config.js to add a filter that can limit post counts. | |
Example: Show last five most recent posts | |
<ul> | |
{% for item in collections.all | reverse | limitTo(5) %} | |
<li><a href="{{ item.url }}">{{ item.data.title }}</a></li> | |
{% endfor %} | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
feedExclude.js - Exclude content from 11ty feeds | |
This filter replaces: | |
- any element with the "feed-exclude" class (recommended) | |
- any content found between <feed-exclude> tags | |
...with a link to the same post on the website. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Original tutorial URL from 2001 | |
"Crossbrowser DOM Scripting: Event Handlers" | |
https://scottandrew.com/weblog/articles/cbs-events | |
Archive.org link: | |
https://web.archive.org/web/20051124085135/https://scottandrew.com/weblog/articles/cbs-events | |
"AddEvent considered harmful" | |
https://www.quirksmode.org/blog/archives/2005/08/addevent_consid.html |