-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Check List
- I have already read Docs page & Troubleshooting page.
- I have already searched existing issues and they are not help to me.
- I examined error or warning messages and it's difficult to solve.
- I am using the latest version of Hexo. (run
hexo versionto check) - My Node.js is matched the required version.
Expected behavior
In the latest Hexo update, the :title permalink no longer matches the post's file path as it used to.
This change breaks existing post URLs for users who relied on the previous behavior, and there is currently no replacement option to maintain the old permalink structure.
This impacts blogs that have been live for years, causing broken links and SEO issues.
Please consider providing a backward-compatible replacement or a setting to restore the previous behavior.
Related discussion: https://github.com/orgs/hexojs/discussions/5630#discussioncomment-12904542
Actual behavior
Currently, the :title permalink is no longer based on the post's file name under source/_posts/.
Instead, it appears to be generated from the post-folder-post-filename, causing the permalink to differ from the expected file-based path.
How to reproduce?
- install hexo etc
- in
_config.ymlset permalink to:title.html
Is the problem still there under Safe mode?
Yes
Your Node.js & npm version
node v20.18.3
npm 11.2.0
Your Hexo and Plugin version
[email protected] D:\Repositories\site
├── @isaacs/[email protected] extraneous
├── @npmcli/[email protected] extraneous
├── @types/[email protected] extraneous
├── @types/[email protected] extraneous
├── @types/[email protected] extraneous
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] extraneous
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] extraneous
├── [email protected] extraneous
├── [email protected]
├── [email protected] extraneous
├── [email protected]
├── [email protected] extraneous
└── [email protected] extraneous
Your package.json
{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"hexo": {
"version": "7.3.0"
},
"scripts": {
"build": "hexo generate",
"eslint": "eslint .",
"prepare": "husky install"
},
"dependencies": {
"cheerio": "^1.0.0",
"hexo": "^7.3.0",
"hexo-clean-css": "^2.0.0",
"hexo-filter-nofollow": "^2.0.2",
"hexo-fs": "^5.0.0",
"hexo-generator-archive": "^2.0.0",
"hexo-generator-feed": "^3.0.0",
"hexo-generator-sitemap": "^3.0.1",
"hexo-renderer-marked": "^7.0.1",
"hexo-renderers": "^3.0.0",
"hexo-server": "^3.0.0",
"hexo-tag-embed": "^1.0.0",
"hexo-uglify": "^2.0.0",
"lunr": "2.3.9",
"sharp": "^0.34.1"
},
"devDependencies": {
"eslint": "^9.25.1",
"eslint-config-hexo": "^6.0.0",
"husky": "^9.1.7",
"imagemin-lint-staged": "^0.5.1",
"lint-staged": "^15.5.1",
"npm-check-updates": "^18.0.1"
},
"lint-staged": {
"*.{png,jpeg,jpg,gif,svg}": [
"imagemin-lint-staged",
"git add"
],
"*.js": "eslint --fix"
},
"engines": {
"node": ">=14"
},
"packageManager": "[email protected]"
}Your site's _config.yml (Optional)
title: Hexo
subtitle: "A fast, simple & powerful blog framework powered by Node.js."
description: "Hexo is a fast, simple & powerful blog framework powered by Node.js."
author: Hexo
language: en
timezone: UTC
url: https://www.webmanajemen.com/hexo-themes
root: /hexo-themes/
permalink: :title.html
archive_dir: archives
code_dir: downloads/code
new_post_name: :year/:month/:day/:title.md # File name of new posts
post_asset_folder: true
per_page: 0
pretty_urls:
trailing_index: false
trailing_html: false
theme: mundana
highlight:
enable: true
line_number: false
disqus_shortname: hexojs
google_analytics: UA-48498357-3
fb_admins: 100000247608790
algolia:
en:
api_key: c3d5d4c995b5e0c2ffb5623900279a66
index_name: hexo
zh-tw:
api_key: c83d2ec3440f40aec6d0e695ecec7ef3
index_name: hexo_zh-tw
zh-cn:
api_key: cdea7d4e47d84f6145b77e7f68689f35
index_name: hexo_zh-cn
twitter: hexojs
github: hexojs/hexoOthers
No response