mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-06 20:55:21 +00:00
Excalidraw data should not be treated as link
This commit is contained in:
parent
2e9432181e
commit
795b6250db
@ -82,6 +82,10 @@ module.exports = function(eleventyConfig) {
|
|||||||
|
|
||||||
eleventyConfig.addTransform('link', function(str) {
|
eleventyConfig.addTransform('link', function(str) {
|
||||||
return str && str.replace(/\[\[(.*?)\]\]/g, function(match, p1) {
|
return str && str.replace(/\[\[(.*?)\]\]/g, function(match, p1) {
|
||||||
|
//Check if it is an embedded excalidraw drawing
|
||||||
|
if(p1.indexOf("],[") > -1){
|
||||||
|
return match;
|
||||||
|
}
|
||||||
const [fileName, linkTitle] = p1.split("|");
|
const [fileName, linkTitle] = p1.split("|");
|
||||||
|
|
||||||
let permalink = `/notes/${slugify(fileName)}`;
|
let permalink = `/notes/${slugify(fileName)}`;
|
||||||
@ -120,4 +124,4 @@ module.exports = function(eleventyConfig) {
|
|||||||
passthroughFileCopy: true,
|
passthroughFileCopy: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user