View Markdown from Terminal

November 23, 2021 in memos.

You can view markdown files using any file viewer. However, to get a slightly more pleasent view you can use pandoc to first convert to HTML and then render that with either lynx or w3m (any any other browser.)


# Using pandoc with Lynx
$ pandoc | lynx -stdin

# Using pandoc with w3m
$ pandoc | w3m -T text/html

This can easily be aliased with your shell or used with a function with little effort.