Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 404 page's styling #238

Closed
wants to merge 8 commits into from
Closed

Fix 404 page's styling #238

wants to merge 8 commits into from

Conversation

Lotes
Copy link
Contributor

@Lotes Lotes commented May 30, 2024

Fixes #236

@Lotes Lotes temporarily deployed to pull-request-preview May 30, 2024 06:46 — with GitHub Actions Inactive
Copy link

github-actions bot commented May 30, 2024

PR Preview Action v1.4.6
Preview removed because the pull request was closed.
2024-08-07 06:55 UTC

@Lotes Lotes temporarily deployed to pull-request-preview May 30, 2024 06:55 — with GitHub Actions Inactive
@Lotes Lotes temporarily deployed to pull-request-preview May 30, 2024 07:09 — with GitHub Actions Inactive
@Lotes Lotes temporarily deployed to pull-request-preview May 30, 2024 07:20 — with GitHub Actions Inactive
@Lotes Lotes temporarily deployed to pull-request-preview May 30, 2024 07:26 — with GitHub Actions Inactive
@Lotes
Copy link
Contributor Author

Lotes commented May 30, 2024

This is still draft, because I need to test as a deployment ftm because on local mode it does not show up the custom 404. The problem so far is that the others.html partial includes paths to CSS that are not correct on subpages like "/docs/xxx"...

@Lotes Lotes temporarily deployed to pull-request-preview June 3, 2024 14:08 — with GitHub Actions Inactive
@Lotes Lotes temporarily deployed to pull-request-preview June 3, 2024 14:33 — with GitHub Actions Inactive
@Lotes
Copy link
Contributor Author

Lotes commented Jun 3, 2024

Bah, it seems I cannot test it really on a preview server. The 404 page is a result of the HTTP server, which redirects to 404.html (GH-Preview-Pages does not). So what was missing? The base URL T_T...
I think when we release the changed flag, it will work. But I definitely cannot test it locally.

@Lotes Lotes marked this pull request as ready for review June 3, 2024 14:42
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Lotes
Copy link
Contributor Author

Lotes commented Jun 4, 2024

This seems to break the GitHub PR preview: https://eclipse-langium.github.io/langium-previews/pr-previews/pr-238/docs/

True. We need to set the correct base url before we are building. Otherwise it would be https://eclipse-langium.github.io/langium-previews/pr-previews instead of https://eclipse-langium.github.io/langium-previews/pr-previews/pr-xxx.

EDIT: @msujew I tried adding the base URL in the GH Action. But for some reason it seems to use the workflow file from main, not from the branch. Is there any way to test this locally? Do you know something?

@montymxb
Copy link
Contributor

I've peeked at this too and it feels like hugo isn't responding to a myriad of ways to set a custom 404. The usual locations in layout, static, or even modifying the theme don't seem to have effect (notably the theme's own 404 isn't applied as expected). There can be a few reasons for this based on how we've customized the app, but we're also using an older version from about 3 years ago. I'm not sure how easily we could upgrade, but it might be worth checking if some newer version of hugo makes it easier to resolve this.

@Lotes
Copy link
Contributor Author

Lotes commented Aug 7, 2024

I am closing this PR. No idea how to check this, without breaking something.

@Lotes Lotes closed this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve 404 Page and Dead Link Handling
3 participants