Please check followings before submitting a new issue.
hexo version to check)When I install a theme with npm (eg: npm i hexo-theme-next), and I use one of its defined "tags" (as of Nunjuck tags), I expect it to be available in my content.
When I install a theme with npm (eg: npm i hexo-theme-next), and I use one of its defined "tags" (as of Nunjuck tags), and start the development server (hexo server) I face an error which indicates me hexo does not about this "tag".
err: Error [Nunjucks Error]: _posts/blah.md [Line 5, Column 4] unknown block tag: caniuse
Yes, because it is related to plugins/themes.
Node.js & npm version(node -v && npm -v)
v12.16.0
6.13.4
Your site _config.yml (Optional)
theme: 'hexo-theme-next'
theme_dir: node_modules
Replace
theme: 'hexo-theme-next'
With
theme: next
And remove
theme_dir: node_modules
In Hexo _config.yml, then try again.
Yes indeed, it works!
Thank you for this answer 馃憤
I would not have guessed this by reading the doc.
Question: what if the theme is hosted under an organization name, like @foo/hexo-theme-bar? Or if I want to call it @myuser/hexo-theme?
what if the theme is hosted under an organization name, like
@foo/hexo-theme-bar?
Theme hosted under an organization hasn't been supported yet.
Gotcha.
Thanks for answering me 馃憤
Most helpful comment
Replace
With
And remove
In Hexo
_config.yml, then try again.