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
My post folder structure relies on subfolders per year, like _posts/2023/my-fancy-post.md, with asset folders of the same name, and I use the Tag Plugin post_link in many posts.
Since hexo new post XXX always creates the new post in the root post folder, I recently changed the config entry new_post_name from :title.md to :year/:title to create the new posts directly in the correct folder.
I expected that the new post is created in the appropriate subfolder (works) and Hexo generates my files (works not)
Actual behavior
After the change my build, which executes hexo clean && hexo generate, aborts with the following message:
Template render error: (unknown path)
Error: Post not found: post_link 2023/My-fancy-post.
at Object._prettifyError (C:\Projects\kiko.io\node_modules\nunjucks\src\lib.js:36:11)
at C:\Projects\kiko.io\node_modules\nunjucks\src\environment.js:563:19
at Template.root [as rootRenderFunc] (eval at _compile (C:\Projects\kiko.io\node_modules\nunjucks\src\environment.js:633:18), <anonymous>:92:3)
at Template.render (C:\Projects\kiko.io\node_modules\nunjucks\src\environment.js:552:10)
at Environment.renderString (C:\Projects\kiko.io\node_modules\nunjucks\src\environment.js:380:17)
at C:\Projects\kiko.io\node_modules\hexo\dist\extend\tag.js:206:22
at tryCatcher (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\util.js:16:23)
at Function.Promise.fromNode.Promise.fromCallback (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\promise.js:209:30)
at Tag.render (C:\Projects\kiko.io\node_modules\hexo\dist\extend\tag.js:205:35)
at Object.onRenderEnd (C:\Projects\kiko.io\node_modules\hexo\dist\hexo\post.js:399:32)
at C:\Projects\kiko.io\node_modules\hexo\dist\hexo\render.js:77:29
at tryCatcher (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues (C:\Projects\kiko.io\node_modules\hexo\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:464:21)
The error occurs comprehensible in Hexo 6.3.0 as well as in 7.0.0. :title = generation works, :year/:title generation stops with error.
It seems that if you change the config entry new_post_name from :title.md to :year/:title.md, you need to remove the subfolder prefix in post_link like {% post_link My-fancy-post %}
Check List
hexo version
to check)Expected behavior
My post folder structure relies on subfolders per year, like
_posts/2023/my-fancy-post.md
, with asset folders of the same name, and I use the Tag Pluginpost_link
in many posts.Since
hexo new post XXX
always creates the new post in the root post folder, I recently changed the config entrynew_post_name
from:title.md
to:year/:title
to create the new posts directly in the correct folder.I expected that the new post is created in the appropriate subfolder (works) and Hexo generates my files (works not)
Actual behavior
After the change my build, which executes
hexo clean && hexo generate
, aborts with the following message:The error occurs comprehensible in Hexo 6.3.0 as well as in 7.0.0.
:title
= generation works,:year/:title
generation stops with error.How to reproduce?
/_config.yml
withnew_post_name: :year/:title.md
hexo generate
Is the problem still there under
Safe mode
?Yes
Your Node.js & npm version
Your Hexo and Plugin version
Your
package.json
see https://github.com/kristofzerbe/kiko.io/blob/master/package.json
Your site's
_config.yml
(Optional)see https://github.com/kristofzerbe/kiko.io/blob/master/_config.yml
Others
I was hoping issues like #5042 would help me, but that wasn't the case
The text was updated successfully, but these errors were encountered: