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
I have already searched existing issues and they are not help to me
Well, I tried searching but "css" and "js" aren't very useful search terms. But I tried "helpers" and a bunch of things, and I looked through all 61 open issues, so I don't think this has been reported...
I examined error or warning messages and it's difficult to solve
Using the latest version of Hexo (run hexo version to check)
A local css file: /blog/root/style.css, for example.
relative_links: true
Then:
In /blog/root/index.html you want css(style.css) to return style.css
In /blog/root/archive/index.html you want css(style.css) to give ../style.css
In /blog/root/yyyy/mm/dd/title/index.html you want it to give ../../../../style.css
Actual behavior
Both of these call e.g. moize(cssHelper, ...) (here and here) so the functions are evaluated once and the result will be correct for only one particular level of nesting. Worse, the result may change semi-randomly based on which file is rendered first (i.e. it might be different on different incremental builds).
So if relative_links is set and these helpers are given a local path, the memoization needs to take into account not only the argument to the function but also the page it's being rendered for.
The text was updated successfully, but these errors were encountered:
Check List
Please check followings before submitting a new issue.
hexo version
to check)Expected behavior
Given:
/blog/root/style.css
, for example.relative_links: true
Then:
/blog/root/index.html
you wantcss(style.css)
to returnstyle.css
/blog/root/archive/index.html
you wantcss(style.css)
to give../style.css
/blog/root/yyyy/mm/dd/title/index.html
you want it to give../../../../style.css
Actual behavior
Both of these call e.g.
moize(cssHelper, ...)
(here and here) so the functions are evaluated once and the result will be correct for only one particular level of nesting. Worse, the result may change semi-randomly based on which file is rendered first (i.e. it might be different on different incremental builds).So if
relative_links
is set and these helpers are given a local path, the memoization needs to take into account not only the argument to the function but also the page it's being rendered for.The text was updated successfully, but these errors were encountered: