parent
1ff4a7485e
commit
501af07c95
3 changed files with 7 additions and 5 deletions
|
@ -112,10 +112,12 @@ module.exports = function(eleventyConfig) {
|
|||
if (href.startsWith('http')) {
|
||||
tokens[idx].attrSet('target', '_blank');
|
||||
tokens[idx].attrSet('rel', 'noreferrer');
|
||||
} else {
|
||||
const newHref = eleventyConfig.javascriptFunctions.locale_url(href);
|
||||
tokens[idx].attrSet('href', newHref);
|
||||
}
|
||||
// this would be useful but it's broken
|
||||
// else {
|
||||
// const newHref = eleventyConfig.javascriptFunctions.locale_url(href);
|
||||
// tokens[idx].attrSet('href', newHref);
|
||||
// }
|
||||
|
||||
return self.renderToken(tokens, idx, options);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue