-
Hello, thank you for providing this clean and beautiful Hugo blog theme. I'm currently attempting to align an image to the center within MD files, but I've tried several methods without success. The images continue to remain left-aligned. Some of the methods I've attempted include: <div style="display: flex; flex-direction: row; align-items: center; justify-content: center;">
![Appium Architecture](/images/appium-arch.webp "Appium Architecture")
</div> or <div style="display: block; margin: 0 auto; max-width: 100%;">
![Appium Architecture](/images/appium-arch.webp "Appium Architecture" )
</div> How I can achieve that in your theme? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You cannot use markdown in raw html. I put one example in image process page <p align="center" width="100%">
<img src="./images/logo.png">
</p> and the demo site: https://hugo-theme-tailwind.tomo.dev/post/image-process/ |
Beta Was this translation helpful? Give feedback.
-
@tomowang Thank you for your response and for adding a sample. Could you please take a look and let me know why it doesn't work as expected? |
Beta Was this translation helpful? Give feedback.
I find the issue.
<!-- raw HTML omitted -->
in output result. So add the settings likehttps://github.com/tomowang/hugo-theme-tailwind/blob/main/config/_default/hugo.toml#L19-L21
or refer to the settings in exampleSite (the
merge=deep
will merge the default setting from theme, see https://gohugo.io/getting-started/configuration/#merge-configuration-from-themes)https://github.com/tomowang/hugo-theme-tailwind/blob/main/exampleSite/config/_default/hugo.toml#L14-L15
…