Closed seanlook closed 9 years ago
You need to check the CSS of the theme you are using.
The theme Landscape put the image in the center by default. It's controlled by the .article-entry img
in $THEME/source/css/_partial/article.styl
.
To put the image in the center as default, set its margin to auto
.
You can also create CSS classes and explicitly specify the class of the image using img tag.
For example, create a class align-left
:
.align-left
margin-left: 20px
Apply it:
{% img align-left /PATH/IMAGE/ IMAGE-NAME %}
I want to use ![][]
to keep compatibility with Github Favored Markdown. I don't think GFM would translate {% %}
. Any other advice?
You can try hexo-renderer-pandoc that supports pandoc-markdown.
With ![][]
you can't specify CSS class, so just change the margin of .article-entry img
to auto
directly.
I concur that theme customization is the solution. Please close this issue.
Of course
<center> ![img][link] </center>
will work for me, but I don't want to add<center>
block every time I have image. I need images set align by default. Could this be accomplished with css or by new markdown's features. ( As I konw{: .center }
block could be work for some markdown like python-markdown) Thanks!