mirror of
				https://github.com/fooflington/selfdefined.git
				synced 2025-11-04 07:39:03 +00:00 
			
		
		
		
	feat(11ty): add filter for post inspection and linkTarget
This commit is contained in:
		@@ -1,6 +1,13 @@
 | 
				
			|||||||
module.exports = function (config) {
 | 
					module.exports = function (config) {
 | 
				
			||||||
  // Add a filter using the Config API
 | 
					  // Add a filter using the Config API
 | 
				
			||||||
  // config.addFilter("myFilter", function () { });
 | 
					  config.addFilter('linkTarget', (slug) => `#${slug}`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  config.addFilter('postInspect', function (post) {
 | 
				
			||||||
 | 
					    console.log(post);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  config.addPassthroughCopy({'_site/css/': 'assets/css/'})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Add collections here
 | 
					  // Add collections here
 | 
				
			||||||
  config.addCollection('definitions', collection => {
 | 
					  config.addCollection('definitions', collection => {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user