Offline reading for Elfeed posts using a Service worker
I wrote a blog post here with more details on the motivation to build it and an overview of how it works.
- Configure Elfeed and start the Elfeed web server using
M-x elfeed-web-startin Emacs. - Install the latest version of dune nightly. (works only on Linux and MacOS, currently)
- Clone the project
dune(unlikeopam) doesn’t automatically manage external (system) dependencies. You can rundune show depextsto see the external dependencies, and install them using your system’s package manager (likeapt,homebew, etc.)- Run
dune build. This will install all the dependencies including an OCaml compiler, and could take a while.
- Set
ELFEED_USERNAMEandELFEED_PASSWORDenvironment variables to restrict access to yourself. - Run
dune exec -- elfeed-offlineto start the Dream server - Run the
scripts/make-cert.shscript to create SSL certificates. This is necessary for the service worker to work correctly, when accessing from a different device than the server. Follow the instructions in the script to copy and add the additional certificates to your mobile phone. - Access the server in your browser. Use
https://<hostname>.local:9000to have everything working even with dynamic IPs. - Wait for a few seconds to make sure everything is cached in the browser for offline reading.
- Enjoy reading!