Search code examples
.netservicestack

Service Stack API Explorer - how to customize the landing page?


I created a new ServiceStack (v. 6.11) project using the "x" tool, as suggested in the documentation: https://docs.servicestack.net/create-your-first-webservice#step-2-selecting-a-template

The API explorer (https://docs.servicestack.net/api-explorer) is automatically enabled and working under URL https://localhost:5001/ui/. The docs mention that it is possible to override some parts of it: https://docs.servicestack.net/api-explorer#override-built-in-components

My question is - is it possible to modify the landing page? I would like to replace the "Welcome to" with my own custom HTML content. Service Stack UI explorer landing page


Solution

  • Ok, I was able to find the solution. It is based on https://github.com/ServiceStack/ServiceStack/blob/main/ServiceStack/src/ServiceStack/modules/ui/components/Welcome.mjs

    So that file has to be placed like this: enter image description here

    Which results in

    enter image description here

    I wish that was better documented :(