But when I navigate to /docs/overview the markup is being rendered, but not with the Layout as defined in _Layout.cshtml
I have tried adding default.cshtml with the appropriate @Html.Partial(“overview”) but this is also not working for me.
One other issue is that the redirect to “default.cshtml” in the absence of a markdown page doesn’t work when servicestack is in a virtual directory/application. I have tried setting WebHostUrl to “http://mylocation/app/” but it still redirects to “http://mylocation/api/docs/” rather than “http://mylocation/app/api/docs”. Is there a way around this?
Also the layout page for Markdown Razor doesn’t use a Razor _Layout.cshtml page (it needs to work when Razor is not enabled), it uses a static default.htm template, see the Simple Layout Example in the Markdown Razor docs, which for your example would look like:
As Markdown Razor doesn’t support cascading layouts your pages would need to reference the layout explicitly, e.g:
@Layout docs/default.htm
I’m not sure if I understand if we’re talking about the same issue, but Config.WebHostUrl is only for changing which external absolute url, relative urls are resolved to. If you want to redirect to a different url from where ServiceStack is hosted you would use Config.DefaultRedirectPath, e.g:
But there was an issue with DefaultRedirectPath when ServiceStack was hosted at a /custom path which should be resolved with this commit. This should now properly resolve to /api/docs/ path and load the default document.