DEV Community

Cover image for How I Present Markdown Slides from the Terminal
Waylon Walker
Waylon Walker

Posted on • Originally published at waylonwalker.com

How I Present Markdown Slides from the Terminal

I love the freedom of writing in markdown. It allows me to write content from the comfort of my editor with very little focus on page style. It turns out that markdown is also a fantastic tool for creating slides.

Present from the terminal

I will most often just present right from the terminal using lookatme. Presenting from the terminal lets me see the results quick right from where I am editing. It also allows me to pop into other terminal applications quickly.

reveal.js

I sometimes also use reveal.js, but that's for another post. It is handy that it lives in the browser and is easier to share.

New Slides

I leverage auto slides when I write my slides in markdown. The largest heading, usually an h2 for me, becomes the new slide marker. Otherwise my process is not much different, It just becomes a shorter writing style.

Installation

lookatme is a python library that is available on pypi, you can install it with the pip command.

python -m pip install lookatme
Enter fullscreen mode Exit fullscreen mode

Since it's a command line application it works great with pipx. This prevents the need to manage virtual environments yourself or ending up with packages clashing in your system python environment.

pipx install lookatme
Enter fullscreen mode Exit fullscreen mode

From my terminal

lookatme {filepath}
Enter fullscreen mode Exit fullscreen mode

I just run it with pipx.

pipx run \
 --spec git+https://github.com/waylonwalker/lookatme \
 lookatme {filepath} \
 --live-reload \
 --style gruvbox-dark
Enter fullscreen mode Exit fullscreen mode

Note, I use a custom fork of lookatme. It's schema validation did not like
the date format of my blog posts, so I have a one line fix built into my
fork that is pretty specific to me.

From Neovim

most often what I do

From Neovim I use a plugin I created for sending out commands to tmux called telegraph. This sends the above command to a new session that I can bounce between quickly.

nnoremap <leader><leader>s <cmd>lua require'telegraph'.telegraph({cmd='pipx run --spec git+https://github.com/waylonwalker/lookatme lookatme {filepath} --live-reload --style gruvbox-dark', how='tmux'})<CR>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)