Git Product home page Git Product logo

Comments (13)

RX14 avatar RX14 commented on May 23, 2024 3

Bump, this is still accessible from google and still broken.

from crystal-book.

matiasgarciaisaia avatar matiasgarciaisaia commented on May 23, 2024 3

I've just deleted the file from the S3 bucket, so it now displays an ugly 404 error.

We should probably add a custom, nice 404 error page.

from crystal-book.

RX14 avatar RX14 commented on May 23, 2024 2

@straight-shoota please KISS: clean the bucket and add a good 404 page. This is overengineering.

from crystal-book.

j8r avatar j8r commented on May 23, 2024 1

I like the one from https://crystal-lang.org/404

from crystal-book.

straight-shoota avatar straight-shoota commented on May 23, 2024

from https://docs.travis-ci.com/user/deployment/s3/

Note that deploying to S3 only adds files to your bucket, it does not remove them. If you need to remove deprecated files you can do that manually in your Amazon S3 console.

from crystal-book.

straight-shoota avatar straight-shoota commented on May 23, 2024

This should really be solved.

Just manually kicking obsolete pages out of the bucket would already help.
Or we could add the file back to the repo as redirect to a new location.

from crystal-book.

RX14 avatar RX14 commented on May 23, 2024

this should be automated

from crystal-book.

straight-shoota avatar straight-shoota commented on May 23, 2024

Maybe it would be best to just replace obsolete URLs with a redirect.

When there is not a direct replacement (like with global variables), it could also be a custom 404 page explaining that this was removed and referencing related sections. I don't know how or if custom 404 at specific paths can be implemented in S3, though. It would be fairly easy with Netlify's redirect rules.

from crystal-book.

RX14 avatar RX14 commented on May 23, 2024

the 404 page is beside the point, the point is clearing the s3 bucket before we upload the new files

from crystal-book.

straight-shoota avatar straight-shoota commented on May 23, 2024

If every URL that ever existed, will always resolve to a file (and be that just a redirect or custom 404 page), the bucket wouldn't need to be cleaned, because all files will simply be overridden.

from crystal-book.

j8r avatar j8r commented on May 23, 2024

I'm against redirections. This seems good at first, but we'll end with a redirection hell.
Where to do the redirections, in Route53, keeping the old empty page to do this in HTML?
Just a 404 page is fine, even more for those trying to access pages that have never existed https://crystal-lang.org/docs/404.

For the cleanup side, this can be done in the CI with a custom script/command talking to the AWS API to delete single or multiple objects.

from crystal-book.

straight-shoota avatar straight-shoota commented on May 23, 2024

redirection hell

That's a limitation of the specific infrastructure, but not in general.

Redirects would allow to replace outdated paths (such as installation/on_bash_on_ubuntu_on_windows -> installation/windows_subsystem_for_linux) while still being able to access the specified resource from the old path. Currently, we just left the old path to avoid dealing with change. But that's not a viable long-term solution.

from crystal-book.

straight-shoota avatar straight-shoota commented on May 23, 2024

It doesn't need to be implemented right away, but redirects are a ordinary components of a website and nothing super-fancy and overengineered. I'd like to think of having redirects from obsolete paths as being a pretty standard feature. This is usually included when I deploy static websites.

from crystal-book.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.