-
Notifications
You must be signed in to change notification settings - Fork 173
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
Navigating away from a blog post attempts to get the blog's images from the new page #2184
Comments
michaelkedar
pushed a commit
that referenced
this issue
May 22, 2024
Issue: #2184 Turbo always tries to cache the page after a link, but after navigate to a new page, it can't get the images of the blogs cause they use relative path, e.g. https://github.com/google/osv.dev/blob/2e1117e5c9360f755d46165eaf2f2bf6b576d09f/gcp/appengine/blog/content/posts/announcing-guided-remediation-in-osv-scanner/index.md?plain=1#L36 This PR disables the cache feature of Turbo Drive which is a quick solution, but this will reduce the performance when navigate back to the blog (content won't be stored and it will load a fresh page). Another solution is improving the images path for each blog, for example use `/static/blog/posts/announcing-guided-remediation-in-osv-scanner/gr_main.png` instead of `gr_main.png`. But by going this way, we need to keep in mind to use absolute path when adding a new blog. Please let me know your thought, or any other solution.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
On the website, if you are view a blog post with images and navigate to another page, the browser will attempt to get the images from the blog post relative to the page you've just navigated to, which will 404.
To Reproduce
Steps to reproduce the behaviour:
Monitoring the browsers network requests:
Expected behaviour
The browser should not be trying to fetch blog images when leaving the blog's page.
Screenshots
Additional context
Chrome's network browser is telling me the initiator is from
@hotwired/turbo
, which seems to be interacting with how images are relatively loaded from the hugo-generated blog pages.The text was updated successfully, but these errors were encountered: