Fix 404 error when navigating away from blog page #2217
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
osv.dev/gcp/appengine/blog/content/posts/announcing-guided-remediation-in-osv-scanner/index.md
Line 36 in 2e1117e
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 ofgr_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.