You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pass in a custom fetching function rather than a URL #23
Howdy! I think it would be really nice if I could pass in a function that fetches my data from the target URL, rather than passing in the URL directly. For my use case specifically, I want to pull in data from the GitHub API at build time using their Octokit helper library. It's definitely possible to make requests by hand by assembling a request URL, but it's not as ergonomic (plus, Octokit allows you to aggregate paginated calls without needing to do this yourself). Is this something this plugin could accommodate? Maybe it would just need to accept a user-supplied key for caching since it's no longer getting a URL directly.
Reacted by Charlie Wright, Simon Dann, Daniel Lee, leah, Chris Burgess, ⁂ Tommi, Tori, Gaelan Steele, Danny White and Rob OLeary
Activity
carbontwelve commentedon Sep 6, 2022
I think implementing this would provide a solution to #2.
feat(11ty#23): Pass in a custom fetching function rather than a URL
feat(11ty#23): Pass in a custom fetching function rather than a URL
feat(11ty#23): Pass in a custom fetching function rather than a URL
zachleat commentedon Oct 22, 2024
Merged #32—thank you @doug-wade!