Open Lotes opened 3 weeks ago
I tried to make the paths relative, but Hugo seems not to accept some little amount of links and makes them relative to the root instead of the current path. That makes the link checker pointless.
I think one issue could be that the base URL doesn't end in a trailing slash. I didn't run Hugo myself, but in the following HTML:
<head>
<base href="/pr-249">
</head>
<body>
<a href="./page">Page</a>
<a href="page">equivalent link</a>
</body>
the links will actually point to /page
. To have them point to /pr-249/page
, the base URL needs to be /pr-249/
instead.
The other issue is that with <base>
set, all relative URLs in the website become relative to that base. For example, ./features
will be /pr-249/features
, not /pr-249/docs/features
as intended.
Lastly, I think the build script is not necessary because Hugo can be configured through environment variables, according to the docs. I believe it should suffice to set the env var HUGO_BASEURL
instead.
PR Preview Action v1.4.6 :---: :rocket: Deployed preview to https://eclipse-langium.github.io/langium-previews/pr-previews/pr-249/ on branch
previews
at 2024-08-28 09:19 UTC