Created blog collection by filtering based on folder and markdown filetype
This commit is contained in:
parent
6bf2206d03
commit
f38b722b09
|
@ -5,10 +5,17 @@ module.exports = function(eleventyConfig) {
|
|||
|
||||
eleventyConfig.addLayoutAlias('page', 'layouts/page')
|
||||
|
||||
/* Creating a collection of blogposts by filtering based on folder and filetype */
|
||||
eleventyConfig.addCollection("blog", (collectionApi) => {
|
||||
return collectionApi.getFilteredByGlob('./src/blog/*.md').reverse()
|
||||
})
|
||||
|
||||
return {
|
||||
dir: {
|
||||
input: 'src',
|
||||
output: '_site',
|
||||
includes: '_includes',
|
||||
data: '_data'
|
||||
},
|
||||
markdownTemplateEngine: 'njk'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue