View Markdown from Terminal
Published: 23 November 2021
Note: this article is old and may contain outdated or incorrect information.
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.)
Examples:
# Using pandoc with Lynx
$ pandoc file.md | lynx -stdin
# Using pandoc with w3m
$ pandoc file.md | w3m -T text/html
This can easily be aliased with your shell or used with a function with little effort.