Created
June 8, 2020 05:42
-
-
Save JayHoltslander/bcc21e29ad1179f7b8354569ab5dddd4 to your computer and use it in GitHub Desktop.
This file when placed in 11ty's _data folder will fetch a Sheety API endpoint for use with 11ty
This file contains 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
// Fetch external data for use with 11ty (https://www.11ty.dev) | |
const fetch = require("node-fetch"); | |
module.exports = async function() { | |
console.log( "Fetching titles…" ); | |
// Sheety API - See: https://sheety.co/ | |
const response = await fetch("https://v2-api.sheety.co/fc583ad9266228c03ecc1ee9ace31835/starWarsChronologicalOrder/sheet1") | |
return response.json(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment