Chat Component for Jekyll

Posted: 15 Feb 2025. Last modified on 16-Feb-25.

This article will take about 1 minute to read.



Creating a Jekyll component which looks like a series of text messages.

The texts are defined like this

- sender: other
  name: Alex
  text: "Hey, how's it going?"
  timestamp: "10:30 AM"

- sender: me
  text: "Pretty good! You?"
  timestamp: "10:32 AM"

and they get rendered like this. Note that it’s just html/css! Not an image.



Alex
Hey, how's it going?
10:30 AM
10:32 AM
Pretty good! You?
Alex
Not bad, just working on some stuff.
Want to see something cool?
10:32 AM
10:36 AM
Sure!
Alex
Image from Alex
10:37 AM
10:38 AM
Haha, love it!


Browser