File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ const pkg = require ( "./package.json" ) ;
1
2
const EleventyNavigation = require ( "./eleventy-navigation" ) ;
2
3
3
4
// export the configuration function for plugin
4
5
module . exports = function ( eleventyConfig ) {
6
+ try {
7
+ eleventyConfig . versionCheck ( pkg [ "11ty" ] . compatibility ) ;
8
+ } catch ( e ) {
9
+ console . log ( `WARN: Eleventy Plugin (${ pkg . name } ) Compatibility: ${ e . message } ` ) ;
10
+ }
11
+
5
12
eleventyConfig . addFilter ( "eleventyNavigation" , EleventyNavigation . findNavigationEntries ) ;
6
13
eleventyConfig . addFilter ( "eleventyNavigationBreadcrumb" , EleventyNavigation . findBreadcrumbEntries ) ;
7
14
eleventyConfig . addFilter ( "eleventyNavigationToHtml" , function ( pages , options ) {
Original file line number Diff line number Diff line change 32
32
"url" : " https://zachleat.com/"
33
33
},
34
34
"license" : " MIT" ,
35
- "peerDependencies " : {
36
- "@11ty/eleventy " : " >=0.7.0 "
35
+ "11ty " : {
36
+ "compatibility " : " >=0.7 || >=1.0.0-canary "
37
37
},
38
38
"devDependencies" : {
39
39
"ava" : " ^3.15.0"
You can’t perform that action at this time.
0 commit comments