You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I used ejs to get the url of prev&next page, I found the path given was wrong. I think it's because I set my blog in a subdirectory. (In fact it's www.example.com/blog/)
For example, my prev post lies in www.example.com/blog/post1.html. When Hexo renders post 2, url_for(page.prev.path) gives www.example.com/blog//blog/post1.html, which lead the link to 404.
Though it does work, do I have to use page.prev.path directly?
The text was updated successfully, but these errors were encountered:
In #3701 full_url_for helper is added to Hexo and will be released with Hexo v4. Use full_url_for helper after Hexo v4 if you need to get absolute path.
When I used ejs to get the url of prev&next page, I found the path given was wrong. I think it's because I set my blog in a subdirectory. (In fact it's
www.example.com/blog/
)For example, my prev post lies in
www.example.com/blog/post1.html
. When Hexo renders post 2,url_for(page.prev.path)
giveswww.example.com/blog//blog/post1.html
, which lead the link to 404.Though it does work, do I have to use
page.prev.path
directly?The text was updated successfully, but these errors were encountered: