eclipse-langium / langium-website

Source of langium.org
https://langium.org/
MIT License
14 stars 34 forks source link

Try to fix 404 #249

Open Lotes opened 3 weeks ago

github-actions[bot] commented 3 weeks ago

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

Lotes commented 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.

aabounegm commented 1 week ago

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.