It would be cool if there was a way to render Hugo pages dynamically like Eleventy Serverless. A possible use case could be doing server side search where you return a page of rendered results built with Hugo’s templates.
This can be done also easily with netlify.io serverless functions in basic hugo.
And if i’m not wrong (never used elevently), elevently needs netlify too for this.
Isn’t this the exact opposite of a static site? Why do this with Hugo?
Because you might still want to use Hugo for the thousands static files you will build on top of your “on-demand” pages.
Okay, but for the given use case:
It works just fine to use Algolia to power the search. The search is server side, but rendering is client side. So it is far more efficient than any server side rendering approach.
I know I could create a template to use with JS and manipulate it serverside.
Thing is I it would be nice if I could make a request which can be built using the Hugo templates I set up by giving Hugo a bunch of data to render when needed.
Server side rendering also allows your search to work without JS!