mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-01-22 17:30:00 +00:00
feat(11ty): definition is not spelled defintion, definition is not spelled defintion
This commit is contained in:
parent
ff410b0d49
commit
08d48f1a24
@ -5,10 +5,10 @@ module.exports = function (config) {
|
|||||||
config.addFilter('linkTarget', makeItemLink);
|
config.addFilter('linkTarget', makeItemLink);
|
||||||
|
|
||||||
config.addFilter('linkIfExistsInCollection', (word, collection) => {
|
config.addFilter('linkIfExistsInCollection', (word, collection) => {
|
||||||
const existingDefintion = collection.find(item => item.data.title === word)
|
const existingDefinition = collection.find(item => item.data.title === word)
|
||||||
|
|
||||||
if (existingDefintion) {
|
if (existingDefinition) {
|
||||||
return `<a href=${makeItemLink(existingDefintion.data.slug)}>${word}</a>`
|
return `<a href=${makeItemLink(existingDefinition.data.slug)}>${word}</a>`
|
||||||
}
|
}
|
||||||
|
|
||||||
return word
|
return word
|
||||||
|
Loading…
x
Reference in New Issue
Block a user