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的问题续篇 #1452

Closed W1ndys closed 4 months ago

W1ndys commented 4 months ago

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

4.12.0

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

是 (Yes)

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

Chrome

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

Windows

依賴插件 | Package dependencies Information

├── hexo-abbrlink@2.2.1
├── hexo-blog-encrypt@3.1.9
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-search@2.4.3
├── hexo-generator-sitemap@3.0.1
├── hexo-generator-tag@2.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-kramed@0.1.4
├── hexo-renderer-markdown-it-katex@3.4.4
├── hexo-renderer-pug@3.0.0
├── hexo-renderer-stylus@3.0.1
├── hexo-server@3.0.0
├── hexo-theme-anzhiyu@1.6.12
├── hexo-theme-butterfly@4.12.0
├── hexo-theme-landscape@1.0.0
├── hexo-wordcount@6.0.1
└── hexo@7.1.1

問題描述 | Describe the bug

https://github.com/jerryc127/hexo-theme-butterfly/issues/1446 续集 虽然没找到bug的原因 但是我用外部js解决了这个bug,挂在这里如果有遇到相同bug的用户可以用这个方法解决

//重置左上角跳转专用

    // 在页面加载完成后执行
    document.addEventListener("DOMContentLoaded", function() {
      // 获取要修改的链接元素
      var linkElement = document.querySelector("#blog-info a");

      // 修改链接的 href 属性
      if (linkElement) {
        linkElement.href = "/";
      }
    });

出現問題網站 | Website

localhost

W1ndys commented 4 months ago

bug已解决 https://github.com/jerryc127/hexo-theme-butterfly/issues/1433#issuecomment-1926711912