Closed kurko closed 1 year ago
Found the culprit: apparently targetList.filter((x) => !sourceList.includes(x)) is removing the word obsidian
from images/obsidian/naming.png
. I don't understand why it needs to drop a directory, unsure whether it's a feature for something else or a bug.
Here's the screenshot with all values. Notice at the end, it drops the directory:
Can you advise on how to fix this? I'm afraid it'd break other things that are expected somewhere else 😬 This is the last remaining block to get my blog to get published from Obsidian 😄
I Will check that ! Don't worry :D
I pushed a beta version of this fix, could you please try it and keep me informed about it ?
I can confirm it worked with 4.3.7-0 (beta) 😄
I noticed now that links aren't working, and I think it might be due to this change (need to confirm).
Here's my config:
Here is the screenshot in Obsidian showing from about
(source) to my-digital-workbench
(target).
Note that:
my-digital-workbench
file has frontmatter filename: _pages/my-digital-workbench
(with _pages), obsidian/_pages/my-digital-workbench
as expected,about
points to obsidian/my-digital-workbench, omitting _pages
.As I can see, It's not a markdown or wikilinks no ? My regex for internal links only work on these
Hm... yes it is. If you check again this image, the wikilink [[my-digital-workbench|Check out my work setup]]
on the bottom right pane is a link.
This seems to be the same issue I'm currently struggling with. The image links in my posts start with "/posts/" but the images are at the same link but without that. I was actually following your blog post, @kurko, though what I assume was the solution you figured out (the text replacer) has not been working for me. Any ideas?
Issue validation
Workflow
Obsidian plugin ðŸ’
Describe the bug
tl;dr with
Default Attachment Folder
(defaultImageFolder
) set toimages/obsidian
, dev console shows thatconvertLinkCitation
ignores that and returnsimages/naming.png
instead ofimages/obsidian/naming.png
.It seemed to be similar to https://github.com/ObsidianPublisher/obsidian-github-publisher/issues/8, which was supposed to be fixed by https://github.com/ObsidianPublisher/obsidian-github-publisher/commit/0755d375e672ceeab1a0216e0c9f4bf63ec762f7, but it wasn't.
Upon investigation, I think the culprit is this line. It was supposed to be using the default attachment path and is not. It's returning
images/naming.png
You can see in the generated PR that the image path is correctly
images/obsidian/naming.png
, but the markdown file itself is not including obsidian/ in src.How to reproduce ?
Configuration
Relevant log output
No response
OS
MacOS
Anything else?
Minor feedback: the lack of tests make it difficult to contribute