-
-
Notifications
You must be signed in to change notification settings - Fork 341
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
Error on inline image using standard markdown notation #126
Comments
You never include the If the image is in the content directory If you put it in |
That is not how I understand the documentation related to static file hosting here
In my case, the image file is in Also, this is working just fine with other themes, and the error message above seems to originate from Congo, not Hugo. I was going to dig into it personally later, but thought I'd report it here. |
Thanks for the issue report, however this is not a bug as this is the expected behaviour. Version 2 of the theme uses Hugo Pipes to process images and as such they need to be supplied as assets, either in the Just so I can understand more about your workflow, is there a particular reason you can't include these images in the page bundle? |
I don't think there is any reason why I couldn't relocate the static image files to another directory for processing, I've just had this blog with hugo for a long time and would need to transition the files out of I would of course like to use "standard markdown" (if there is such a thing) as much as possible rather than customize the posts for Hugo's implementation. |
I still think there is an issue here. What I have is a branch bundle according to the Hugo docs here. I should be able to dump all of the images directly into this folder along with my According to the docs, you cannot get access to images in assets or static using |
So I think based on the documentation you have to treat a branch bundle's resources differently than a leaf bundle. I think if the |
I thing what is happening is: your "figure shortcode" overwrite is breaking hugo's approach to backwards compatibility, as well still current Static Files approach. |
Yeah, @robotamer I think you're right. I have found that if I override
with
Then I can simply move everything from So, there probably needs to be an if statement here to first look for the image in the local directory so that it works with leaf bundles, and a fallback to look in the resources directory. |
Thanks for the detailed comments on this issue. I've had a further look at this and agree that adding extra functionality so that resources can be found in both the assets directory and page bundles is a better user experience. Doing this also provides all the performance benefits of image scaling, etc. that the theme aims to achieve. I'll make some changes in the next release to adjust this behaviour and hopefully it will improve the image handling in your use case. |
What happened?
I have a markdown file with an inline reference to an image. It looks like this:
![image-2.png](/obsidian/image-2.png)
when I try to generate the site or serve locally, I get the following error message:
ERROR 2022/02/16 13:17:04 [CONGO] Markdown image error in "obsidian/write-test.md": Resource "/obsidian/image-2.png" not found. Check the path is correct or remove the image from the content. Error: Error building site: logged 1 error(s)
I've tried putting the file in the correct static dir, and in the content dir, and cannot seem to make this work. I'm assuming this is Congo specific based on the error message, and when I test with a different theme (hugo-bearblog) the image renders correctly with no error messages.
Theme version
2.0.4
Hugo version
0.92.2
What browsers are you seeing the problem on?
No response
Relevant Hugo log output
The text was updated successfully, but these errors were encountered: