Created
April 27, 2017 16:36
-
-
Save stefanoverna/d436e19f7cff1c66c53090b3d5ee7825 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