Open jmooring opened 2 years ago
This is a known limitation (or at least known to me, but I think I have shouted about it). This was somewhat a catch 22 situation and needed to be able to implement render hooks for code blocks. When I get to finish #9570 I can make this work as expected (then I have global access to "the current page", as it is now we always use the home page for markdownify
), but until then I would recommend people with advanced markdownify
needs to use .Page.RenderString
etc.
I understand. I just wanted to make sure this was being tracked somewhere.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
My use case is a render hook for links that checks whether the current page has a parameter set that makes all external links open in a new tab. It would be great if markdownify worked everywhere.
Pull request closed https://github.com/gohugoio/hugo/pull/9570
The result is either a missing resource or the wrong resource. This is limited to the
markdownify
function....Page.RenderString
works as expected.The problem occurs with v0.93.0 and later.
structure
content/test/index.md
layouts/shortcodes/img.html
layouts/_default/_markup/render-image.html
When you run hugo, the result is:
If you do this...
...the site builds but the wrong image is displayed.
Example:
Reference: https://discourse.gohugo.io/t/37735