mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-01-22 17:30:00 +00:00
chore: move findExistingDefinition into own file
This commit is contained in:
parent
7a74dc494d
commit
e7002614c1
@ -1,6 +1,5 @@
|
||||
const makeItemLink = (slug) => `#${slug}`;
|
||||
const findExistingDefinition = (word, collection) =>
|
||||
collection.find((item) => item.data.title === word);
|
||||
const findExistingDefinition = require('./11ty/filters/helpers/findExistingDefinition');
|
||||
|
||||
module.exports = function(config) {
|
||||
// Add a filter using the Config API
|
||||
|
2
11ty/filters/helpers/findExistingDefinition.js
Normal file
2
11ty/filters/helpers/findExistingDefinition.js
Normal file
@ -0,0 +1,2 @@
|
||||
module.exports = (word, collection) =>
|
||||
collection.find((item) => item.data.title === word);
|
Loading…
x
Reference in New Issue
Block a user