-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image wikilinks for export in Obsidian #8853
Comments
You can find some LUA filters here, but basically I'm facing the same problem. |
This extension is supposed to be a general extension, not Obsidian specific. |
Good question, I don't know either. So maybe a filter to convert wikilinks
to MD links would be recommended? Or using only MD links?
…On Mon, Jul 3, 2023, 17:48 John MacFarlane ***@***.***> wrote:
This extension is supposed to be a general extension, not Obsidian
specific.
So, I'm wondering whether ! + wikilink = image in other markdown
applications that support wikilinks (e.g. GitHub wiki).
—
Reply to this email directly, view it on GitHub
<#8853 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCL5FG2GZPW6PQBTZYZHZTXOLSUPANCNFSM6AAAAAAYBZH5J4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
For an obsidian-specific solution, you just need a filter that finds the sequence
and converts this to an Image. That's not the easiest kind of filter to write but it's possible. |
Wikilink images now supported. |
Great news! Has this already been released? |
No, it will be in the next release. Probably within the next couple of weeks? |
Okay, thanks for the answer. Looking forward to it! |
I am running Pandoc 3.1.8, with Obsidian.md and Pandoc plugin 0.4.1 Simply running the pandoc MD to DOCX results in an error. The path of the image files are incorrect, regardless of What settings need to be configured to properly export to a Docx? |
@Demon-tk Are you using the |
@FeralFlora Thanks for the response, where do I enable extensions? |
You add it to the input format (from) like so |
Above I have put my Obsidian Pandoc settings. Additionally my extra arguments are:
EDIT: After checking the docx file it appears that the images are turned into words rather than the actual image. Any idea what I'm doing wrong? |
@Demon-tk Since you edited you comment, I have to ask if you are still having errors or not, as you mentioned earlier? I think you should consider switching to the Enhancing export plugin, since it is still maintained, and allows you to customize your whole command, not just add extra arguments. But regardless, I think image wikilink exports should work through the Pandoc plugin using extra arguments—it works for me. |
I have a source file
And Pandoc command like this: And the result is:
For some reason Pandoc comments out the image. |
This will currently work with |
You can add a new issue requesting support for |
Indeed! Thank you for a prompt response. I'll add an issue. |
@jgm, I wonder if it's also possible to transform paths of wikilinks somehow? For example - if I have wikilinks pointing to a subfolder - can Pandoc rewrite them to point to the top-level folder? |
You can use a filter to rewrite wikilink URLs. |
I use Obsidian and Pandoc Plugin to export to epub, html, docx.
There are new extensions in Pandoc 3.0 for wikilinks:
"Add new extensions wikilinks_title_after_pipe and wikilinks_title_before_pipe for commonmark and markdown".
They can't export Obdisian images with ! to markdown image links:
![[image1.png]]
— image wikilink in Obsidian.I get ! and an image URL, so images are not inserted.
Besides I have two problems:
--resource-path=assets
.--from=gfm+wikilinks_title_after_pipe
text is exported from Obsidian without colors from Obsidian theme.I'd like to automatically export wikilinks to markdown links not only for URLs but also for images, with title from image file name if it is not specified. Please add features to your extensions and give examples.
Current alternative:
At first I convert wikilinks to markdown links from every article I want to export with another plugin obsidian-link-converter . Or I can convert all wikilinks from my vault.
The text was updated successfully, but these errors were encountered: