We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
确保你在提交Bug反馈之前仔细阅读了Hexo文档,Icarus用户指南,和GitHub issues来了解你的问题是否已经被他人提出过。
Bug描述 简洁清晰地描述你遇到的Bug是什么。
Ahrefs SEO 问题报告中多达 251 个Page has links to redirect, 我的内容页面也就259个,最后发现是profile widget下面的 archives, categories, tags 链接有问题,正确的连接应该是 例如https://pengtech.net/archives/ 但是icarus theme生成的连接是https://pengtech.net/archives 尾巴上少了一个正斜杠,导致了redirect. SEO report 如下:
系统与环境 列出你的Hexo和Icarus的版本和配置。
$hexo version INFO Validating config Inferno is in development mode. INFO DPlayer.min.css is not found in this version of dplayer, skip it. INFO ======================================= ██╗ ██████╗ █████╗ ██████╗ ██╗ ██╗███████╗ ██║██╔════╝██╔══██╗██╔══██╗██║ ██║██╔════╝ ██║██║ ███████║██████╔╝██║ ██║███████╗ ██║██║ ██╔══██║██╔══██╗██║ ██║╚════██║ ██║╚██████╗██║ ██║██║ ██║╚██████╔╝███████║ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ============================================= INFO === Checking package dependencies === INFO === Checking theme configurations === INFO === Registering Hexo extensions === hexo: 7.3.0 hexo-cli: 4.3.2 os: linux 6.8.8-300.fc40.x86_64 Fedora Linux 40 (Workstation Edition) node: 20.12.2 acorn: 8.11.3 ada: 2.7.6 ares: 1.27.0 base64: 0.5.2 brotli: 1.1.0 cjs_module_lexer: 1.2.2 cldr: 44.1 icu: 74.2 llhttp: 8.1.2 modules: 115 napi: 9 nghttp2: 1.60.0 nghttp3: 0.7.0 ngtcp2: 0.8.1 openssl: 3.0.13+quic simdutf: 4.0.8 tz: 2024a undici: 5.28.4 unicode: 15.1 uv: 1.46.0 uvwasi: 0.0.20 v8: 11.3.244.8-node.19 zlib: 1.3.0.1-motley-40e35a7
hexo version
_config.yml
_config.icarus.yml
themes/icarus/_config.yml
_config.post.yml
_config.page.yml
复现方式 列出复现这个Bug的步骤,如:
看我的SEO截图,看红色标记部分。
期望行为 简洁清晰地描述没有这个情况下你期望得到的结果。 期望profile widget上的连接结尾加上正斜杠,避免301 redirect请求
截图 如果可以的话,请附上几张截图来帮助说明你遇到的问题。
额外上下文 附上与问题有关的其他上下文信息。
出现问题的代码位于: themes/icarus/layout/widget/profile.jsx
return { avatar: getAvatar(), avatarRounded: avatar_rounded, author, authorTitle: author_title, location, counter: { post: { count: postCount, title: _p('common.post', postCount), url: url_for('/archives') }, category: { count: categoryCount, title: _p('common.category', categoryCount), url: url_for('/categories') }, tag: { count: tagCount, title: _p('common.tag', tagCount), url: url_for('/tags') } },
same issue on tags breadcrumb navigation
themes/icarus/layout/tag.jsx
module.exports = class extends Component { render() { const { config, page, helper } = this.props; const { url_for, _p } = helper; return <Fragment> <div class="card"> <div class="card-content"> <nav class="breadcrumb" aria-label="breadcrumbs"> <ul> <li><a href={url_for('/tags')}>{_p('common.tag', Infinity)}</a></li> <li class="is-active"><a href="#" aria-current="page">{page.tag}</a></li> </ul> </nav> </div> </div> <Index config={config} page={page} helper={helper} /> </Fragment>; } };
<li><a href={url_for('/tags')}>{_p('common.tag', Infinity)}</a></li>
生成的连接结尾没有正斜杠,导致301 redirect, 最终导致很多错误报告在SEO report中。
same issue on category breadcrumb nav links themes/icarus/layout/category.jsx
module.exports = class extends Component { render() { const { config, page, helper } = this.props; const { url_for, _p } = helper; return <Fragment> <div class="card"> <div class="card-content"> <nav class="breadcrumb" aria-label="breadcrumbs"> <ul> <li><a href={url_for('/categories')}>{_p('common.category', Infinity)}</a></li> {page.parents.map(category => { return <li><a href={url_for(category.path)}>{category.name}</a></li>; })} <li class="is-active"><a href="#" aria-current="page">{page.category}</a></li> </ul> </nav> </div> </div> <Index config={config} page={page} helper={helper} /> </Fragment>; } };
The text was updated successfully, but these errors were encountered:
fix: page has links to redirect ppoffice#1314
eb3c80a
Merge pull request #1324 from forgetfulengineer/official_issue
27f0afe
fix: page has links to redirect #1314
No branches or pull requests
Bug描述
简洁清晰地描述你遇到的Bug是什么。
Ahrefs SEO 问题报告中多达 251 个Page has links to redirect, 我的内容页面也就259个,最后发现是profile widget下面的 archives, categories, tags 链接有问题,正确的连接应该是 例如https://pengtech.net/archives/ 但是icarus theme生成的连接是https://pengtech.net/archives 尾巴上少了一个正斜杠,导致了redirect. SEO report 如下:
系统与环境
列出你的Hexo和Icarus的版本和配置。
hexo version
命令来查看)_config.yml
_config.icarus.yml
或themes/icarus/_config.yml
_config.post.yml
,或_config.page.yml
)复现方式
列出复现这个Bug的步骤,如:
看我的SEO截图,看红色标记部分。
期望行为
简洁清晰地描述没有这个情况下你期望得到的结果。
期望profile widget上的连接结尾加上正斜杠,避免301 redirect请求
截图
如果可以的话,请附上几张截图来帮助说明你遇到的问题。
额外上下文
附上与问题有关的其他上下文信息。
出现问题的代码位于:
themes/icarus/layout/widget/profile.jsx
same issue on tags breadcrumb navigation
themes/icarus/layout/tag.jsx
<li><a href={url_for('/tags')}>{_p('common.tag', Infinity)}</a></li>
生成的连接结尾没有正斜杠,导致301 redirect, 最终导致很多错误报告在SEO report中。
same issue on category breadcrumb nav links
themes/icarus/layout/category.jsx
The text was updated successfully, but these errors were encountered: