Settings

Theme

Show HN: leaf – a terminal Markdown previewer with a GUI-like experience

github.com

26 points by RivoLink 8 hours ago · 18 comments

Reader

DonaldPShimoda 2 hours ago

> Features:

> <bullet> <checkbox> description 1

> <bullet> <checkbox> description 2

> ...

Like... why are we doing this. What is the purpose of having a bunch of green checkbox emojis in the already bulleted list of features. The only thing it tells me is that an LLM was probably used extensively in building this project.

SupLockDef 3 hours ago

`pandoc "$@ | lynx -stdin` and I save you from 225 potential supply chain attack crates.

`cargo audit` finds 3 vulnerabilities, you should fix them.

Blazing safe.

jasonpeacock an hour ago

I used to use Glow, but now I'm enjoying mdterm:

https://github.com/bahdotsh/mdterm

RivoLinkOP 8 hours ago

Hi HN,

I built leaf, a Markdown previewer that runs entirely in the terminal.

It supports keyboard/mouse navigation, syntax highlighting, tables, checkboxes, clickable links, search, table of contents, local Markdown links, inline images, Mermaid diagrams, and LaTeX-to-Unicode rendering.

It works on Linux, macOS, Windows, and Termux.

GitHub: https://github.com/RivoLink/leaf

I’d appreciate feedback on the UX, missing features, and performance on large Markdown files.

  • yboris 2 hours ago

    Please consider adding a screenshot directly into the README (rather than a separate link).

    Also maybe a single paragraph at the top describing the project rather than jumping into `install`.

    • RivoLinkOP 2 hours ago

      Thanks for your feedback. I added the screenshot and a short description inside it.

  • benj111 2 hours ago

    Why a previewer rather than an editor that updates as you write?

    Do you have a specific use case?

    It seems to me that markdown is for writing with the ultimate output supposedly being html. Having a viewer of the markdown doesn't seem to add anything.

    Whereas making it an editor makes it more of a rich text editor.

    I'm not particularly saying youre wrong, more posing a philosophical question.

    • RivoLinkOP an hour ago

      There are both "open in editor" and "watch" modes.

      The idea is not to replace an editor, but to complement it: - "open in editor" lets you edit the file with your preferred editor - "watch" automatically refreshes the preview when the file changes

      So you can keep your usual workflow while having a fast, structured preview directly in the terminal.

timetraveller26 3 hours ago

cool project, how does it compare to glow? https://github.com/charmbracelet/glow

  • kseistrup an hour ago

    For one thing, glow doesn't do math equations.

  • fragmede 2 hours ago

    If this project doesn't have open issues going back a year that are unanswered, it's doing better than glow. I forked glow to fix this one specific rendering bug, because the maintainers didn't respond to my bug report. I can't say that my fork is any better maintained, because no one is using it, but glow isn't maintained and has bugs so I wouldn't hold it up as anything other than abandonware.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection