Markdown resize image6/18/2023 ![]() Super easy, and holy shit I would have never been able to figure out that shortcode stuff without my hand held, nor do I want to. So that's only once I put custom CSS, then one that targets the logo in the header, and one for the footer. In my case, the images I use in all posts should all be a certain width, and the height set to auto. OH I thought he just wanted to do it to a single image. Not saying I'm right and you're wrong, just that's why I really like this tool. Not saying I'm right and you're wrong, just that's why I really like this said in How can I scale an image in a Hugo said in How can I scale an image in a Hugo said in How can I scale an image in a Hugo page: I can also redeploy the same site on literally anything because there's no backend to deal with. Every so often I'll have to write something like the above solution but it's not common and I don't have to manage anything. I don't have to manage a server, database, patches, plugins, worry about security of my system/CMS, etc or pay someone to do that for me. My personal opinion is that I think this is much easier to maintain. You just write the shortcode one time and then use it when you want to. The above solution is just a tag you write in your post. You'd have to continually add CSS properties for every image you create. The problem with CSS for this is it it only works with one image or all of them. If it wasn't for the theme I found I'd be going back to WP or HTML template. ![]() That's a huge turn off for me with Hugo as well as so many of the other annoyances. And is a hell of a lot easier to maintain and write than trying to code all that other B.S. Most Hugo themes have a way to add custom CSS properly, so that's my preferred method to changing visuals. I tried to just use the HTML element in the Hugo page, but it was not rendered. Searching the net, it seems a lot of tools have added functionality to markdown to support image scaling, but it seems Hugo's implementation of Markdown has not. This seems to be an issues for me with using Hugo, I have an existing site that I am converting and the images are scaled with the normal tag. Thanks.Said in How can I scale an image in a Hugo said in How can I scale an image in a Hugo page:Ĭurrently, markdown does not natively have a way to scale images. I can write the script, but I am uncertain about how to write the Hugo stuff. Can anyone tell me whether I should use a shortcode or straight HTML, and how to setup this code. 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. So in the actual post markdown, I imagine I need some kind of code to tell Hugo how to handle that image. And then I would create a link in the markdown post that sets the image size and centering. What I would like to do, is have the images in the same folder as my post itself. 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. ![]() 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 this does not give me a way to resize the image if it is too small or to center the image. 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). I am working on a more mathematical blog that will have some plots and figures, etc. ![]() So I am still new to Hugo, and just trying to figure out my toolchain.
0 Comments
Leave a Reply. |