I have wondered many times.

Of course I can always use a browser but it’s overkill.

The same goes for yad or zenity, they pull in webkit which is a full-fledged browser engine, and at least yad does not have an offline mode.

I just want to look at some local HTML (incl. images) & CSS styling.

  • Zyberlex@lemmygrad.ml
    link
    fedilink
    arrow-up
    2
    ·
    3 days ago

    FWIW “just displaying html” is one of those can of worms type problems that looks easy enough to start making but actually impossible to do fully correct.

    You want something thats doing a WebView, so if not a Firefox then maybe one of the lighter weight ones like Falkon or Gnome Web etc.

  • CarrotsHaveEars@lemmy.ml
    link
    fedilink
    arrow-up
    14
    ·
    5 days ago

    Do you just want to see the text content of a HTML file? - a text editor

    Do you want most, if not all, HTML tags to be rendered as pretty graphical shapes?

    Do you want the text have proper fonts?

    Styles? You need something to parse CSS files.

    What about dynamically generated content like ten smiley faces? You need a JavaScript engine.

    Do you also want to see iframes? You need it to be capable of sending XHR requests.

    What if it references to a piece of WebAssembly?

    It’s way more complicated than you anticipated.

  • D_Air1@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    4 days ago

    Believe it or not. kde’s khelpcenter is what I have been using. Not sure if it includes images, but it renders simple html files and according to the Arch package. It is only like 7 MiB. Way better and faster than using a whole browser, but doesn’t really support javascript obviously.

    • A_norny_mousse@feddit.orgOP
      link
      fedilink
      arrow-up
      4
      ·
      4 days ago

      Thanks! Unfortunately my system is not KDE so it would pull in too much.

      yelp (help for gnome) can render HTML, too.

      I’ve been trying different things; in the end I guess something like yad or zenity is still the best. netsurf is really fast but I don’t know how to style it as a viewer without a toolbar/urlbar.

      I’d love to find a simple frontend to litehtml.