Closed ThatOtherAndrew closed 2 years ago
Thanks for showing an interest in the project!
Great input, I didn't even know about the image width property. I've implemented the changes. (Was not able to take into account that the pipe character is escaped, it seems the template engine removes it before I can access it)
You can use the "Create PR"-button in the plugin setting to add the changes to your own site. Let me know if it works for you.
The new feature appears to function correctly with links, however I've noticed an edge case with embedded images with the following syntax:
[|500](https://image.url/)
In Obsidian, this would set the image width to 500 pixels, however Digital Garden sets <img alt="|500">
.
This is a very minor detail though - thank you for the implemented feature so far and the very quick updates!
Hmm, this should be working. As a a test i published this note: https://github.com/oleeskild/notathage/blob/main/src/site/notes/Image%20Test.md
Which resulted in this page, setting the correct width: https://ole.dev/notes/image-test
Do you have a concrete example where this doesn't work as you expected?
Ah, I'm a doofus - I think I didn't update and rebuild the site properly. I re-published the page, and all is functioning as intended now. Thanks for your help!
(Closing)
Problem
If you have a link such as
![[cat.jpg|500]]
or[[A very long file name|myfile]]
, they do not display the same as in Obsidian.Proposed Solution
!
) and the string is numeric, set thewidth
HTML attributehref
attributeI'd submit a pull request, but I don't have a very good understanding of how the templating engine works 😅