Writing a Book with JAMStack

Typewriters are almost gone. Software has become the norm, but when you take a look at the list of the most popular book writing softwares, you find expensive What You See Is What You Get (WYSIWYG) editors like Scrivener or writeai or multi-purpose and cumbersome ones such as Google Docs, Microsoft Word, or Libre Office. WYSIWYM remains a techie's tool.

Latex has dominated academia for several years since its first release in 1985, even before Tim Berners-Lee's invention fo the World Wide Web in 1989. Latex wasn't designed for web consumption. In 2004, Markdown established itself as a more minimalistic approach to publishing HTML documents using a markup language.

Markdown is now the de-facto markup language used by developers around the world, and yet, the tools available to write a book using Markdown remain rudimentary.

I used Pandoc to write my first ebook. It wasn't a great developer experience. It makes converting markdown to pdf, epub, or mobi easier, but customizing is hard. Writing a bibliography with Pandoc is a cumbersome mix of Latex syntax and markdown variables. This is definitely not the tool I would have imagined to publish a book in 2020.

A few months later, I started using GatsbyJS to redesign my personal website, a JAMStack static file generator based on React and Markdown. And another few weeks later, I decided to work on my next ebook. That's when it hit me: an ebook is simply a progressive web app.

When you write an ebook, programming tools and principles can be applied to increase your productivity, like versioning and cascading style sheets. An EPUB file is an XHTML archive. Same with the Mobipocket file format used by Amazon. Generating HTML is a mandatory step of publishing an ebook, so it's not much different from coding a static website.

Modern JAMstack static website generators are the best tools we can use to write books in extended Markdown and publish them in different formats. The best part is that it's fast and free: you can easily build a rich HTML version of your book, convert it to PDF, EPUB and MOBI, and publish it on Netlify for everyone to read in less than a minute. How powerful is that?

Now, not everyone is a developer, and not everyone is familiar with JAMstack, so I decided to build my own visual website generator to allow anyone to do what I just mentioned using a dead-simple content management system. The beta is coming out soon, don't forget to subscribe to Bouquin!