hexo icon indicating copy to clipboard operation
hexo copied to clipboard

:name parameter in permalink cannot work as expected.

Open Xheldon opened this issue 1 year ago • 1 comments

Check List

  • [X] I have already read Docs page & Troubleshooting page.
  • [X] I have already searched existing issues and they are not help to me.
  • [X] I examined error or warning messages and it's difficult to solve.
  • [X] I am using the latest version of Hexo. (run hexo version to check)
  • [X] My Node.js is matched the required version.

Expected behavior

expected: /tech/use-notion-flow.html

Actual behavior

result: /tech/tech-2024-use-notion-flow.html

How to reproduce?

  1. add file: source/_posts/tech/2015/how-to-work.md

  2. modify _config.yml: permalink: :category/:name.html

  3. hexo generate or hexo server in browser

Is the problem still there under Safe mode?

YES

Your Node.js & npm version

node 18.19.7

iMac 2017, x64

Your Hexo and Plugin version

NO PLUGIN

Your package.json

No response

Your site's _config.yml (Optional)

No response

Others

permalink 中的 name 不符合预期,对于 _posts/life/2015/xxx.md 来说,官网文档说 permalink 中的 :name 表示的是 xxx,但是实际是 life-2015-xxx,而且没有任何办法获取到文件名 xxx

Xheldon avatar May 25 '24 15:05 Xheldon

can't reproduce

$ ls -R source/_posts

source/_posts/tech/2024:
myPostFileName.md

INFO  Generated: postsDir/myPostFileName.html

uiolee avatar May 26 '24 01:05 uiolee

Close as can't repro

I cannot reproduced this case and no one provides enough information, I am going to close this issue.

If the problem still exists or anyone has any info, feel free to comment or open issue.

uiolee avatar Jul 08 '24 07:07 uiolee