Have you ever wanted to show off your beautiful terminal output in a markdown file? Simply copying the text into a raw block will result in bland, colorless text. Including a screenshot on the other hand is bloated and hard to maintain, in case the content changes. I recently found a nice solution, so let me tell you about it!
Here's a sneak-peak of the end result:
.rw-r--r--@ 3 remo 28 Feb 00:29 .gitignore drwxr-xr-x@ - remo 8 Mar 22:51 repo drwxr-xr-x@ - remo 8 Mar 23:12 working_copy
I'll use the above output of eza for demonstration purposes as we progress. Below you can see the output of jj in my current repo.
@ kqlsx remo (no description set) ○ uxkrx remo improve recipe for new blog posts ○ qwmqx remo main* add color theme for aha-generated blocks │ • qwmqx hidden remo main@origin add color theme for aha-generated blocks ├─╯ • lumlx remo add just recipe for new blog posts │ ~
You'll notice that this is just HTML, you can even copy the text. The colors are easily stylable with CSS, which we'll get into later.