@@ -26,46 +26,49 @@ module.exports = function (eleventyConfig) {
2626 eleventyConfig . addTransform ( "parse" , parseTransform ) ;
2727
2828 // Passthrough copy
29- eleventyConfig . addPassthroughCopy ( { "src/admin/config.yml" : "admin/config.yml" } ) ;
30- eleventyConfig . addPassthroughCopy ( { "src/assets/icons" : "/" } ) ;
31- eleventyConfig . addPassthroughCopy ( { "src/assets/images" : "assets/images" } ) ;
32- eleventyConfig . addPassthroughCopy ( { "src/assets/uploads" : "assets/uploads" } ) ;
3329 eleventyConfig . addPassthroughCopy ( {
34- "node_modules/decap-cms/dist/decap-cms.js" : "lib/cms/decap-cms.js" ,
35- "node_modules/decap-cms/dist/decap-cms.js.map" : "lib/cms/decap-cms.js.map" ,
36- "node_modules/nunjucks/browser/nunjucks-slim.min.js" : "lib/cms/nunjucks-slim.min.js" ,
37- "node_modules/prop-types/prop-types.min.js" : "lib/cms/prop-types.min.js" ,
38- "node_modules/react/umd/react.development.js" : "lib/cms/react.development.js" ,
39- "node_modules/react/umd/react.production.min.js" : "lib/cms/react.production.min.js"
30+ "src/admin/config.yml" : "admin/config.yml"
4031 } ) ;
32+ eleventyConfig . addPassthroughCopy ( { "src/assets/icons" : "/" } ) ;
33+ eleventyConfig . addPassthroughCopy ( { "src/assets/images" : "assets/images" } ) ;
34+ eleventyConfig . addPassthroughCopy ( { "src/assets/uploads" : "assets/uploads" } ) ;
4135
4236 // Custom collections
43- eleventyConfig . addCollection ( "pages" , collection => {
37+ eleventyConfig . addCollection ( "pages" , ( collection ) => {
4438 return collection . getFilteredByGlob ( "./src/collections/pages/*.md" ) ;
4539 } ) ;
4640
47- eleventyConfig . addCollection ( "planning" , collection => {
48- return collection . getFilteredByGlob ( "./src/collections/guides/*.md" ) . filter ( function ( item ) {
49- return item . data . category === "planning" ;
50- } ) . sort ( ( a , b ) => {
51- return a . data . order - b . data . order ;
52- } ) ;
41+ eleventyConfig . addCollection ( "planning" , ( collection ) => {
42+ return collection
43+ . getFilteredByGlob ( "./src/collections/guides/*.md" )
44+ . filter ( function ( item ) {
45+ return item . data . category === "planning" ;
46+ } )
47+ . sort ( ( a , b ) => {
48+ return a . data . order - b . data . order ;
49+ } ) ;
5350 } ) ;
5451
55- eleventyConfig . addCollection ( "doing" , collection => {
56- return collection . getFilteredByGlob ( "./src/collections/guides/*.md" ) . filter ( function ( item ) {
57- return item . data . category === "doing" ;
58- } ) . sort ( ( a , b ) => {
59- return a . data . order - b . data . order ;
60- } ) ;
52+ eleventyConfig . addCollection ( "doing" , ( collection ) => {
53+ return collection
54+ . getFilteredByGlob ( "./src/collections/guides/*.md" )
55+ . filter ( function ( item ) {
56+ return item . data . category === "doing" ;
57+ } )
58+ . sort ( ( a , b ) => {
59+ return a . data . order - b . data . order ;
60+ } ) ;
6161 } ) ;
6262
63- eleventyConfig . addCollection ( "reflecting" , collection => {
64- return collection . getFilteredByGlob ( "./src/collections/guides/*.md" ) . filter ( function ( item ) {
65- return item . data . category === "reflecting" ;
66- } ) . sort ( ( a , b ) => {
67- return a . data . order - b . data . order ;
68- } ) ;
63+ eleventyConfig . addCollection ( "reflecting" , ( collection ) => {
64+ return collection
65+ . getFilteredByGlob ( "./src/collections/guides/*.md" )
66+ . filter ( function ( item ) {
67+ return item . data . category === "reflecting" ;
68+ } )
69+ . sort ( ( a , b ) => {
70+ return a . data . order - b . data . order ;
71+ } ) ;
6972 } ) ;
7073
7174 // Plugins
0 commit comments