-
Notifications
You must be signed in to change notification settings - Fork 484
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
Use relative path for thumbnail image url #695
Comments
the same issue found in generated search result page html += '<a class="link-unstyled" href="' + (post.link || post.permalink) + '">'; |
👋 @bfcs, I would like to help you but I need more information. Could you please fill out the template to report a bug (including versions of your module, hexo, system, etc...)? |
Hi, @LouisBarranqueiro , so return urlFor(post.permalink + post.thumbnailImage); result is but currently the site haven't deployed, so get the url will return a 404 error. I suggest use relative path, |
👋 @bfcs, could you please fill out the template to report a bug (including versions of your module, hexo, system, etc...)? I believe this problem is related to the version of Hexo because it works well on my side. Please re-open this issue when you updated the issue with the information needed. |
Description
scripts/filters/thumbnail_image_url.js
Currently the thumbnail image url is
post.permalink + post.thumbnailImage
,e.g.
https://username.github.io/2021/12/09/postname/imagename.jpg
When use
hexo server
to preview locally, there is a 404 error to get the thumbnail image. The image won't show.I recommend using relative path for thumbnail image url.
e.g.
/2021/12/09/postname/imagename.jpg
Explanation / motivation
To preview locally, solve the 404 error.
Additional information
I suggest replace above js code to
I have tested it and it works ok both locally and Github Page, if you agree, I can make a pull request
The text was updated successfully, but these errors were encountered: