jerryc127 / hexo-theme-butterfly

🦋 A Hexo Theme: Butterfly
https://butterfly.js.org
Apache License 2.0
6.82k stars 1.24k forks source link

[Bug]: 关于首页按钮和图标文字按钮跳转的bug #1433

Closed W1ndys closed 4 months ago

W1ndys commented 5 months ago

使用的 Butterfly 版本? | What version of Butterfly are you use?

4.12.0

是否修改过主题文件? || Has the theme files been modified?

不是 (No)

使用的瀏覽器? || What browse are you using?

Chrome

使用的系統? || What operating system are you using?

Windows

依賴插件 | Package dependencies Information

W1ndys@W1ndys MINGW64 /f/blog/blog-butterfly
$ npm ls --depth 0
hexo-site@0.0.0 F:\blog\blog-butterfly
├── hexo-deployer-git@4.0.0
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-tag@2.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-marked@6.2.0
├── hexo-renderer-pug@3.0.0
├── hexo-renderer-stylus@3.0.1
├── hexo-server@3.0.0
├── hexo-theme-butterfly@4.12.0
├── hexo-theme-landscape@1.0.0
└── hexo@7.0.0

問題描述 | Describe the bug

首页导航栏图标旁边的文字,我不知道实际是为了干什么的,暂且按照常识当做是回到首页

但是我实际测试的时候,这个按钮的作用是刷新该界面,与一般的网站运行思路并不相同,不知道是不是bug,反馈一下

PS:经过测试是主题的问题,一开始我以为是我有依赖冲突引起的,于是我开了一个空环境重新配置,准备复现,复现成功了,刚初始化的主题也存在这个问题所以我才断定来提交issues

图标bugPixPin_2024-01-17_20-13-24

还有一个bug就是首页按钮的问题,bug内容与上述一样,假设上面的bug是我的认知错误,设定就是刷新该页面

首页的作用应该是回到首页,但是实际上是刷新该页面。

所以也提交一下issues吧,希望官方大大修复一下。

附图↓

首页bugPixPin_2024-01-17_20-24-31

出現問題網站 | Website

localhost

W1ndys commented 5 months ago

上传了gif不知道能不能看到 我这里可以加载 看不到的话可以看我的博客 https://w1ndys.top/posts/18414cf0.html#/

jerryc127 commented 5 months ago

1, 你的博客沒有開啓pjax 那點左上角擊刷新頁面就正常啦

2.你的目錄 你的配置文件是怎麽寫的? 目錄這裏的跳轉是根據你的配置

W1ndys commented 5 months ago

1, 你的博客沒有開啓pjax 那點左上角擊刷新頁面就正常啦

2.你的目錄 你的配置文件是怎麽寫的? 目錄這裏的跳轉是根據你的配置

好的,谢谢啦,pjax是后面美化的部分吧,那边我还没配置,我去看一下 目录的配置文件下方给你看看

  首页: /#/ || fas fa-home
  时间轴: /archives/ || fas fa-archive
  标签: /tags/ || fas fa-tags
  分类: /categories/ || fas fa-folder-open
  # 清单||fa fa-heartbeat:
  #   音乐: /music/ || fas fa-music
  #   照片: /Gallery/ || fas fa-images
  #   电影: /movies/ || fas fa-video
  友链: /link/ || fas fa-link
  关于: /about/ || fas fa-heart

这里对应首页的那个bug,主题默认的配置是 首页: / || fas fa-home 会直接跳转url/index 如果改成 首页: /#/ || fas fa-home 就不会,就会是跳转首页

W1ndys commented 5 months ago

1, 你的博客沒有開啓pjax 那點左上角擊刷新頁面就正常啦

2.你的目錄 你的配置文件是怎麽寫的? 目錄這裏的跳轉是根據你的配置

你好,刚刚本地部署的时候遇到了新的有意思的东西hhhhh 就是最左上角那个按钮的跳转bug pjax我还没开始配置,但是本地部署的时候就已经没有这个bug了 好吧,现在又不行了,很奇怪 但是上传GitHub之后还是会变成url/index.html

jerryc127 commented 5 months ago

1, 你的博客沒有開啓pjax 那點左上角擊刷新頁面就正常啦 2.你的目錄 你的配置文件是怎麽寫的? 目錄這裏的跳轉是根據你的配置

好的,谢谢啦,pjax是后面美化的部分吧,那边我还没配置,我去看一下 目录的配置文件下方给你看看

  首页: /#/ || fas fa-home
  时间轴: /archives/ || fas fa-archive
  标签: /tags/ || fas fa-tags
  分类: /categories/ || fas fa-folder-open
  # 清单||fa fa-heartbeat:
  #   音乐: /music/ || fas fa-music
  #   照片: /Gallery/ || fas fa-images
  #   电影: /movies/ || fas fa-video
  友链: /link/ || fas fa-link
  关于: /about/ || fas fa-heart

这里对应首页的那个bug,主题默认的配置是 首页: / || fas fa-home 会直接跳转url/index 如果改成 首页: /#/ || fas fa-home 就不会,就会是跳转首页

首页: / || fas fa-home 会直接跳转url/index

你 hexo 的配置url配置有問題

你如果不想把 index.html結尾 把hexo 的配置設爲false

pretty_urls: trailing_index: false # Set to false to remove trailing 'index.html' from permalinks trailing_html: false # Set to false to remove trailing '.html' from permalinks

hexo 的使用問題建議自行 google

W1ndys commented 5 months ago

1,你的博客没有开启pjax那点左上角击刷新页面就正常啦 2.你的目录你的配置文件是怎么写的?

好的,谢谢啦,pjax是后面美化的部分吧,后面我还没有,我去一下目录的配置文件下面给你看看

  首页: /#/ || fas fa-home
  时间轴: /archives/ || fas fa-archive
  标签: /tags/ || fas fa-tags
  分类: /categories/ || fas fa-folder-open
  # 清单||fa fa-heartbeat:
  #   音乐: /music/ || fas fa-music
  #   照片: /Gallery/ || fas fa-images
  #   电影: /movies/ || fas fa-video
  友链: /link/ || fas fa-link
  关于: /about/ || fas fa-heart

这里对应首页的那个bug,主题默认的配置是首页: / || fas fa-home会直接跳转url/index 如果改成首页: /#/ || fas fa-home就不会,那就是跳转首页

首页: / || fas fa-home 会直接跳转url/index

你hexo的配置url配置有问题

如果你不想把index.html结尾把hexo的配置设为false

Pretty_urls: Trailing_index: false # 设置为 false 以从永久链接中删除尾随“index.html” Trailing_html: false # 设置为 false 以从永久链接中删除尾随“.html”

hexo 的使用问题建议自行 google

可是我这两个值就是false😭😭😭

permalink_defaults:
pretty_urls:
  trailing_index: false # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: false # Set to false to remove trailing '.html' from permalinks
jerryc127 commented 5 months ago

你的博客沒有開啓pjax 那點擊刷新頁面就正常啦

1,你的博客没有开启pjax那点左上角击刷新页面就正常啦 2.你的目录你的配置文件是怎么写的?

好的,谢谢啦,pjax是后面美化的部分吧,后面我还没有,我去一下目录的配置文件下面给你看看

  首页: /#/ || fas fa-home
  时间轴: /archives/ || fas fa-archive
  标签: /tags/ || fas fa-tags
  分类: /categories/ || fas fa-folder-open
  # 清单||fa fa-heartbeat:
  #   音乐: /music/ || fas fa-music
  #   照片: /Gallery/ || fas fa-images
  #   电影: /movies/ || fas fa-video
  友链: /link/ || fas fa-link
  关于: /about/ || fas fa-heart

这里对应首页的那个bug,主题默认的配置是首页: / || fas fa-home会直接跳转url/index 如果改成首页: /#/ || fas fa-home就不会,那就是跳转首页

首页: / || fas fa-home 会直接跳转url/index 你hexo的配置url配置有问题 如果你不想把index.html结尾把hexo的配置设为false Pretty_urls: Trailing_index: false # 设置为 false 以从永久链接中删除尾随“index.html” Trailing_html: false # 设置为 false 以从永久链接中删除尾随“.html” hexo 的使用问题建议自行 google

可是我这两个值就是false😭😭😭

permalink_defaults:
pretty_urls:
  trailing_index: false # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: false # Set to false to remove trailing '.html' from permalinks

那我就不清楚了,服務器的問題?

W1ndys commented 5 months ago

你的博客沒有開啓pjax 那點擊刷新頁面就正常啦

1,你的博客没有开启pjax那点左上角击刷新页面就正常啦 2.你的目录你的配置文件是怎么写的?

好的,谢谢啦,pjax是后面美化的部分吧,后面我还没有,我去一下目录的配置文件下面给你看看

  首页: /#/ || fas fa-home
  时间轴: /archives/ || fas fa-archive
  标签: /tags/ || fas fa-tags
  分类: /categories/ || fas fa-folder-open
  # 清单||fa fa-heartbeat:
  #   音乐: /music/ || fas fa-music
  #   照片: /Gallery/ || fas fa-images
  #   电影: /movies/ || fas fa-video
  友链: /link/ || fas fa-link
  关于: /about/ || fas fa-heart

这里对应首页的那个bug,主题默认的配置是首页: / || fas fa-home会直接跳转url/index 如果改成首页: /#/ || fas fa-home就不会,那就是跳转首页

首页: / || fas fa-home 会直接跳转url/index 你hexo的配置url配置有问题 如果你不想把index.html结尾把hexo的配置设为false Pretty_urls: Trailing_index: false # 设置为 false 以从永久链接中删除尾随“index.html” Trailing_html: false # 设置为 false 以从永久链接中删除尾随“.html” hexo 的使用问题建议自行 google

可是我这两个值就是false😭😭😭

permalink_defaults:
pretty_urls:
  trailing_index: false # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: false # Set to false to remove trailing '.html' from permalinks

那我就不清楚了,服務器的問題?

这个我也不清楚,我是托管在GitHub pages的,以前用的fluid主题也出现过这个情况。也许是hexo的问题

W1ndys commented 5 months ago

不过值得注意的是 把配置/改成/#/确实可以有效解决这个bug,但是问题出在哪还没找到

W1ndys commented 5 months ago

1, 你的博客沒有開啓pjax 那點左上角擊刷新頁面就正常啦

2.你的目錄 你的配置文件是怎麽寫的? 目錄這裏的跳轉是根據你的配置

你好,我开启了pjax之后,404页面正常,而不再是无格式页面,但是点击左上角文字图标之后仍然是url/index.html的效果而不是回到首页

W1ndys commented 4 months ago

bug已解决,原因是在Hexo配置文件中relative_link的值写为true,改为false即可解决