3

I'm using Jekyll. On markdowns I want to justify text, I can do it using CSS but i don't want to include HTML inside markdowns, is any possible way to justify text, any Jekyll code or something like that ?

1 Answers1

6

In Kramdown, you can add block attributes like id, class, ... Here we add a text-justify class to our p block :

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
{: .text-justify}

And your css does the rest :

.text-justify {
  text-align: justify;
}
David Jacquel
  • 51,670
  • 6
  • 121
  • 147