• cosmicrose@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    5
    ·
    15 days ago

    I don’t think any epub readers support JS unfortunately.

    Calibre has an ebook editor included in its installation that you can stick your HTML into. However, technically, epubs use XHTML with some XML-based extensions, so there’s some epub-specific learning involved.

    Also, there are lots of other document technologies out there that you can use to produce books, EPUBs, PDFs, etc, if you’re interested. I’m a bit of a nerd about doc prep and typography so I’ve been down a few rabbit holes. Here’s a random selection of stuff I’ve played with:

    • Asciidoctor is a markup format similar to Markdown but is a little more feature-rich. Makes nice ebooks as well as PDFs or HTML pages from the same markup file. I attempted writing a tech book once and this is what I used.
    • mdBook is mostly used for HTML documentation sites but there’s an experimental epub plugin.
    • Typst is more complicated but gives you lots of control over how the page is put together, and is mainly focused on producing print documents and PDFs. It supports a lot of features used in books.
    • LaTeX was invented decades ago because an influential computer scientist and author was writing a book and hated how typesetters laid it out, so he invented his own typesetting language, as ya do. It’s quite old but still used quite a bit, but Typst is a more modern alternative.

    In a completely different direction, if you want to use HTML and CSS and JavaScript to build interactive non-linear stories, like visual novels, there’s Twine. You can even host Twine games on itch.io for free (and they’re okay with NSFW content).

    • Gyrcas@piefed.zipOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      15 days ago

      Eh, I think I’ll stick to what I’m doing. An HTML file with everything embedded has the advantage of being easily shareable and pretty much anyone can read it as long as they have a browser