I want to use htmx to get content from the Strapi API. What steps are needed to configure Strapi for server-side html rendering in the API instead of json?
looks like I’m a bit late to the discussion, but it’s doable by setting the response body and state in the controller:
ctx.response.body = `
<!DOCTYPE html>
<html>
<body> the testing body </body>
</html>`
ctx.response.type = 'text/html; charset=utf-8';
Hope it still help someone!