-
-
Save jescalan/a39e9c7dd3dd8168d90c7e65fc1f8172 to your computer and use it in GitHub Desktop.
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
new SpikeDatoCMS({ | |
addDataTo: locals, | |
token: 'xxx', | |
templates: [ | |
{ | |
collection: (dato) => dato.blogPosts, | |
path: 'templates/post.html', | |
output: (post) => { return `posts/${post.slug}.html` } | |
} | |
] | |
}) | |
// this would expose "loader.itemsRepo" as "dato" to every template | |
// and generate N detail pages, one for each blog post |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment