Skip to content

Lost blog's css and js after deploying to Github. Help! #5212

Closed Answered by TechLangLDY
TechLangLDY asked this question in Question / Answer
Discussion options

You must be logged in to vote

问题刚刚突然解决了,我认为成功的原因应该在站点配置文件里的 url root deploy三个项,我把我现在的配置写出来,供有类似问题的人参考,或许可以帮到你:

# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://填你的github名.github.io
root: /
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: git
  repo: https://github.com/Github名/仓库名.git 
  branch: master

注意:

  • 我这是2023年弄的,其中root配置文件本来是没有的,我是搜网上很多对这个问题的帖子都说要设置这个才加的,或许并不用。
  • 仓库设置那里我一开始用的ssh地址,结果一直出现Error: Spawn failed无法推送到仓库,所以我改了https,但是我后来观察又觉得可能跟用哪个没关系,可能是我的网的问题,可能是待李断了导致的,注意要看到deploy done: git 才是真正部署成功了。
  • 我只是个小白,不一定对哦

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TechLangLDY
Comment options

Answer selected by TechLangLDY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants