`permalink :title` changed without backward-compatible replacement
- Dominant language
- TypeScript
- Stars
- 41.8k
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
### Check List
- [x] I have already read [Docs page](https://hexo.io/docs/) & [Troubleshooting page](https://hexo.io/docs/troubleshooting).
- [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](https://github.com/hexojs/hexo/releases) version of Hexo. (run `hexo version` to check)
- [x] My Node.js is matched [the required version](https://hexo.io/docs/#Required-Node-js-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?
1. install hexo etc
2. in `_config.yml` set permalink to `:title.html`
### Is the problem still there under `Safe mode`?
Yes
### Your Node.js & npm version
```text
node v20.18.3
npm 11.2.0
```
### Your Hexo and Plugin version
```text
hexo-site@0.0.0 D:\Repositories\site
├── @isaacs/fs-minipass@4.0.1 extraneous
├── @npmcli/agent@3.0.0 extraneous
├── @types/keyv@3.1.4 extraneous
├── @types/node@22.15.3 extraneous
├── @types/responselike@1.0.3 extraneous
├── cheerio@1.0.0
├── eslint-config-hexo@6.0.0
├── eslint@9.25.1
├── exponential-backoff@3.1.2 extraneous
├── 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
├── hexo@7.3.0
├── husky@9.1.7
├── imagemin-lint-staged@0.5.1
├── lint-staged@15.5.1
├── lunr@2.3.9
├── node-gyp@11.2.0 extraneous
├── nopt@8.1.0 extraneous
├── npm-check-updates@18.0.1
├── proc-log@5.0.0 extraneous
├── sharp@0.34.1
├── tinyglobby@0.2.13 extraneous
└── undici-types@6.21.0 extraneous
```
### Your `package.json`
```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": "yarn@4.9.1"
}
```
### Your site's `_config.yml` (Optional)
```yaml
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/hexo
```
### Others
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.