We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please check followings before submitting a new issue.
hexo version
#5286 #5194 #5230
register new tag function
hexo.extend.tag.register("series",() => { console.log(hexo.locals.get('posts').length) },{ends: false});
create three posts like this:
--- title: test1 date: 2023-09-03 16:59:42 tags: tag1 --- {% series %}
--- title: test2 date: 2023-09-03 16:59:46 tags: tag1 ---
--- title: test3 date: 2023-09-03 16:59:49 tags: tag1 ---
hexo g and the output result is 2
hexo g
However, if all tags in the post are removed, the result is 3
Node.js & npm version(node -v && npm -v)
node -v && npm -v
v18.12.1 8.19.2
Your site _config.yml (Optional)
_config.yml
Hexo and Plugin version(npm ls --depth 0)
npm ls --depth 0
Your package.json package.json
package.json
{ "name": "hexo-site", "version": "0.0.0", "private": true, "scripts": { "build": "hexo generate", "clean": "hexo clean", "deploy": "hexo deploy", "server": "hexo server" }, "hexo": { "version": "6.3.0" }, "dependencies": { "hexo": "^6.3.0", "hexo-generator-archive": "^2.0.0", "hexo-generator-category": "^2.0.0", "hexo-generator-index": "^3.0.0", "hexo-generator-tag": "^2.0.0", "hexo-renderer-ejs": "^2.0.0", "hexo-renderer-marked": "^6.0.0", "hexo-renderer-stylus": "^3.0.0", "hexo-server": "^3.0.0", "hexo-theme-landscape": "^1.0.0" } }
The text was updated successfully, but these errors were encountered:
I try to remove cache here and it works.
hexo/lib/hexo/locals.ts
Lines 15 to 20 in bc53720
Sorry, something went wrong.
hexo.locals.get('posts')
Successfully merging a pull request may close this issue.
Check List
Please check followings before submitting a new issue.
hexo version
to check)Expected behavior
Actual behavior
#5286 #5194 #5230
How to reproduce?
register new tag function
create three posts like this:
hexo g
and the output result is 2However, if all tags in the post are removed, the result is 3
Is the problem still there under "Safe mode"?
Environment & Settings
Node.js & npm version(
node -v && npm -v
)Your site
_config.yml
(Optional)Hexo and Plugin version(
npm ls --depth 0
)Your package.json
package.json
Others
The text was updated successfully, but these errors were encountered: