hypnagaga_old/src/posts/2022-08-17-post-with-fetched.md
2024-02-08 09:46:58 +01:00

804 B

title description date tags
Post with fetched content Eleventy Fetch fetches and caches resources - at configurable intervals. In this example I am fetching my public repositories with a cache duration of 1 day. 2022-08-28
fetch
feature

Eleventy Fetch fetches and caches resources -- at configurable intervals.

This is an example of fetching external data. In this case, my public repositories (with more than zero stargazer) and a cache duration of 1 day.

Endpoint editable in _data/github.js.

{% for repository in github %} {% if repository.stargazers_count > 10 %}

[{{ repository.name }}]({{ repository.html_url }})

{{ repository.stargazers_count }} GitHub stars {{ repository.description }}

{% endif %} {% endfor %}