Skip to content
New issue

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

fix : 取消 Heo 对 Hexo 文件的引用, 保持主题间的独立性 #3095

Merged
merged 2 commits into from
Jan 1, 2025

Conversation

Daleveral
Copy link
Contributor

@Daleveral Daleveral commented Dec 29, 2024

已知问题

  1. /theme/heo/components/HexoRecentComments.js 引用了 /hexo/components/ 中的 Card.js, 这导致如果删去 hexo 文件夹, heo 就会出错, 网页无法部署

Screenshot 2024-12-29 172715

解决方案

    • hexo/components/Card.js 复制到 heo/components 文件夹中, 重命名为 HexoCard.js
    • heo/components/HexoRecentComments.js 中的 import Card from '@/themes/hexo/components/Card' 改为 import Card from '@./HexoCard'
    • 如此, heo 主题不再依赖 hexo 了

改动收益

  1. 使 heo 与 hexo 主题相互独立

测试确认

  • 本地开发环境测试通过
  • 生产环境构建测试通过
  • 版本号正确显示
  • 环境变量配置正常工作

Copy link

vercel bot commented Dec 29, 2024

@Daleveral is attempting to deploy a commit to the tangly1024's projects Team on Vercel.

A member of the Team first needs to authorize it.

@tangly1024 tangly1024 merged commit c80d645 into tangly1024:main Jan 1, 2025
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants