Layout: Sidebar Custom
This post has a custom sidebar set in the post’s YAML Front Matter.
An example of how that YAML could look is:
sidebar:
- title: "Title"
image: http://placehold.it/350x250
image_alt: "image"
text: "Some text here."
- title: "Another Title"
text: "More text here."
Comentarios
Brynjar Smári
Hey. I’m a newbie to github pages and jekyll, but I am liking the setup and loving your theme!
I have an image that I want to add to the sidebar, but it is a little bit too big. Is there some way I can resize the image in the sidebar YAML Front Matter without needing another copy of it in github? I know I could resize it myself if I was adding it to the body of the text, but I can’t find a way to do it in the YAML Front Matter. Thx
Michael Rose
No there isn’t a native way of doing this. The theme and Jekyll core have no ability to transform your assets.
You’ll need to manually do it, use a task runner like Gulp or Grunt, or a Jekyll plugin to resize the image for you.
Comentar
Su dirección de correo no será publicada. Se han resaltado los campos requeridos *