Skip to content

Unable to align image to the center #27

Answered by tomowang
mmonfared asked this question in Q&A
Discussion options

You must be logged in to vote

I find the issue.

  1. The default markdown setting will ignore the raw html element and put <!-- raw HTML omitted --> in output result. So add the settings like

https://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

  1. Use relative path for images, or the images should be put in static folder.
<p align="center" width="100%">
    <img src="./images/1-appium-arch.webp">
</p>

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@tomowang
Comment options

Answer selected by mmonfared
@mmonfared
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants