Allows configuring a backend through the LEMMY_BACKEND env var.
For example, with LEMMY_BACKEND=https://lemm.ee:
And with LEMMY_BACKEND=https://beehaw.org:
Also:
Add support for the Lemmy API with lemmy-js-client
Add support for rendering markdown using markdown-it
Add support for rendering dates using date-fns
Note that lemmy-js-client accepts a fetchFunction, so we are able to fully take advantage of request memoization by passing in our own fetch. For example, even though there are multiple components rendered on the front page which call apiClient.getSite(), the HTTP request is actually only made once.
The sidebar markdown rendering needs some more work in a future PR, it looks a bit wonky right now (but making it pretty wasn't the goal of this PR anyway)
Allows configuring a backend through the
LEMMY_BACKEND
env var.For example, with
LEMMY_BACKEND=https://lemm.ee
:And with
LEMMY_BACKEND=https://beehaw.org
:Also:
lemmy-js-client
markdown-it
date-fns
Note that lemmy-js-client accepts a
fetchFunction
, so we are able to fully take advantage of request memoization by passing in our ownfetch
. For example, even though there are multiple components rendered on the front page which callapiClient.getSite()
, the HTTP request is actually only made once.