1
1
const syntaxHighlight = require ( '@11ty/eleventy-plugin-syntaxhighlight' )
2
2
const htmlMinifier = require ( 'html-minifier' )
3
3
4
- module . exports = function ( config ) {
4
+ module . exports = function ( config ) {
5
5
config . addPlugin ( syntaxHighlight )
6
6
7
7
config . addLayoutAlias ( 'base' , 'base.njk' )
8
8
config . addLayoutAlias ( 'page' , 'page.njk' )
9
9
10
- config . addFilter ( 'mapNodes' , function ( nodes , radius , width , height ) {
10
+ config . addFilter ( 'mapNodes' , function ( nodes , radius , width , height ) {
11
11
return nodes . map ( ( node , index ) => {
12
12
const angle = ( index / ( nodes . length / 2 ) ) * Math . PI
13
13
const x = radius * Math . cos ( angle ) + width / 2
@@ -22,7 +22,7 @@ module.exports = function(config) {
22
22
} )
23
23
} )
24
24
25
- config . addTransform ( 'htmlmin' , function ( content , outputPath ) {
25
+ config . addTransform ( 'htmlmin' , function ( content , outputPath ) {
26
26
if ( outputPath . endsWith ( '.html' ) ) {
27
27
return htmlMinifier . minify ( content , {
28
28
useShortDoctype : true ,
@@ -43,7 +43,7 @@ module.exports = function(config) {
43
43
layouts : 'layouts' ,
44
44
data : 'data'
45
45
} ,
46
- templateFormats : [ 'njk' , 'md' , 'css ' ] ,
46
+ templateFormats : [ 'njk' , 'md' , '11ty.js ' ] ,
47
47
htmlTemplateEngine : 'njk' ,
48
48
markdownTemplateEngine : 'njk' ,
49
49
passthroughFileCopy : true
0 commit comments