You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building the site with `HUGO_RELATIVEURLS=true` (which is the
default when building locally), the `404.html` page rightfully assumes
that its resources, such as images, can be found via relative URLs like
`./images/favicon.ico`.
That leads to a problem when the `serve-public.js` script wants to Use
it in case it does not have certain file that is in a subdirectory. For
example, when a developer directs their web browser to
http://localhost:5000/docs/git-undo, the result will be the 4O4 page,
but it will be unstyled because it looks for the CSS and the wrong
location.
The solution is to specify the base URL explictly in the served 404
page. In this instance it is easy because we know exactly that this
script will serve the site via http://localhost:5000/ and therefore the
base url is simply the `/`.
Signed-off-by: Johannes Schindelin <[email protected]>
0 commit comments