Hello all. So I am still new to Hugo, and just trying to figure out my toolchain. I am working on a more mathematical blog that will have some plots and figures, etc. I am generating the plots in a markdown file using codebraid
, which will then give me a corresponding output with the image/figure link in markdown format, like ![](images/myimage.png)
. The problem is that this does not give me a way to resize the image if it is too small or to center the image.
So I was reading through the Hugo docs on shortcodes and also a number of blog posts/forum posts on this question. The problem is that there are a number of different suggestions, and I am not familiar enough with Hugo to figure out which is a good answer.
What I would like to do, is have the images in the same folder as my post itself. And then I would create a link in the markdown post that sets the image size and centering.
So the folder would look like:
- content
- my_new_post
-images
-my_image.png
-my_post.md
- my_new_post
So in the actual post markdown, I imagine I need some kind of code to tell Hugo how to handle that image. I am not sure if I should use a shortcode, or if I should just hand code the HTML tags? I will have to use some python script to pull the original link in its markdown format, and then reformat that into the corresponding code, etc. Can anyone tell me whether I should use a shortcode or straight HTML, and how to setup this code. I can write the script, but I am uncertain about how to write the Hugo stuff. Thanks.