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

node_modules 里面的img如何跟随git更改 #168

Open
Gainlos opened this issue Aug 28, 2023 · 2 comments
Open

node_modules 里面的img如何跟随git更改 #168

Gainlos opened this issue Aug 28, 2023 · 2 comments

Comments

@Gainlos
Copy link

Gainlos commented Aug 28, 2023

  • [ x] I am using the latest version of hexo-theme-ayer.
  • [x ] I have reviewed the latest Roadmap on GitHub and searched for current Ayer Issues, which does not help me.

Expected behavior

在_config-ayer.yml中会指定如alipay.img的文件路径;如果我想更换这个路径,我只能去node_modules里的img文件夹改。但是.gitignore会把node_modules里的文件忽略掉,这意味着我无法在远程仓库记录我的更改。我希望有一种方式能让我在远程仓库同步对如alipay.img的更改

# 打赏
# 打赏type设定:0-关闭打赏; 1-文章对应的md文件里有reward:true属性,才有打赏; 2-所有文章均有打赏
reward_type: 2
# 打赏wording
reward_wording: "请我喝杯咖啡吧~"
# 支付宝二维码图片地址,跟你设置logo的方式一样。比如:/images/alipay.jpg
alipay: /images/alipay.jpg  
# 微信二维码图片地址
weixin: /images/wechat.jpg

如上,/images/alipay.jpg定位在node_modules里面,这是我不愿看到的,我希望能在根目录对他重定义,但我不知道如何实现,请为我解惑。

@welcome
Copy link

welcome bot commented Aug 28, 2023

Thanks for opening this issue, maintainers will get back to you as soon as possible!

@Gainlos
Copy link
Author

Gainlos commented Aug 28, 2023

目前我找到一个方法是把项目文件夹整个复制到src/theme文件夹里,然后更名为ayer,这样就可以防止因为node_modules而被git忽略,但这也意味着没必要使用npm i hexo-theme-ayer

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

No branches or pull requests

1 participant