Skip to content

How to add captions (such as below images) but anywhere? #1669

Answered by kungfux
mattpopovich asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure about <my-caption> existence and I didn't find it in the code.

As an option, you can add custom styles to assets\css\jekyll-theme-chirpy.scss as follows to recreate same styles as for built-in captions:

em {
  display: block;
  text-align: center;
  font-style: normal;
  font-size: 80%;
  padding: 0;
  color: #6d6c6c;
}

and then use in posts like

<em>This is my caption</em>

Feel free to adjust per your needs.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kungfux
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