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 #13

Open
Nutomic opened this issue Jan 25, 2021 · 4 comments
Open

Fix 404 page #13

Nutomic opened this issue Jan 25, 2021 · 4 comments

Comments

@Nutomic
Copy link
Member

Nutomic commented Jan 25, 2021

broken: https://lemmy.ml/docs/en/index.htmlasd

working: https://rust-lang.github.io/mdBook/cli/index.htmlasd

@Nutomic
Copy link
Member Author

Nutomic commented Jan 26, 2021

This should be pretty straightforward by adding the following to the nginx config, but I cant get it working.

# docs
location /docs {
    proxy_pass http://0.0.0.0:8030;
    error_page 404 = https://enterprise.lemmy.ml/docs/en/404.html;
}

I also noticed some more problems:

  • loading the 404 page doesnt work because javascript files are served with text/html headers
  • images are not loading, it tries /docs/en/main_screen.png but its under /docs/en/about/main_screen.png, so maybe we need to move the file
  • it would be nice if we could get rid of .html in URLs, but i'm not sure if that works with proxy_pass

Maybe it would be better to fix those problems in Lemmy.

@dessalines
Copy link
Member

dessalines commented Jan 26, 2021

You could redirect to this page: https://enterprise.lemmy.ml/404?err=cant_find_docs

And customize with whatever message you like.

I imagine the 404 stuff should be handled whenever they merge that branch.

@Nutomic
Copy link
Member Author

Nutomic commented Jan 26, 2021

I think it needs to be fixed on our end. Right now we are just serving static files, so we need to specify which file should be served if the one requested cant be found. And the mdbook 404 page is clearly better in this case.

@dessalines
Copy link
Member

I think its on mdBooks end... if I go to https://enterprise.lemmy.ml/docs/en/index.html , all the content-type's for css and javascript are correct. They haven't properly worked out their 404 page. I still just suggest redirecting to our 404 as a short term fix until they actually get their multi-lingual support properly working and merged.

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

No branches or pull requests

2 participants