current position:Home>Building a blog with GitHub pages + hexo (7) how to delete a published article successfully solved: delete it at the same time deploy_ Git folder

Building a blog with GitHub pages + hexo (7) how to delete a published article successfully solved: delete it at the same time deploy_ Git folder

2022-04-29 04:21:08Xia ordinary

【 Roof placement 】【 special column 】 use Github Pages+Hexo Build a blog

cause

I deleted the folder source/_posts After the article you want to delete , perform hexo clean,hexo g,hexo g Found that the article is still in the web page , Delete failed .

Summary of solution steps

1、 Delete folder source/_posts Next target article markdown file
2、 Delete .deploy_git Folder
3、 perform hexo clean after , Re execution hexo g,hexo g that will do .

The specific steps are as follows

  • First step , Go to the folder source/_posts Delete the article you want to delete
     Insert picture description here
  • The second step , Delete .deploy_git Folder
    .deploy_git yes git Files for deployment . When you are git Deployment options run hexo d On command ,Hexo It creates a name .deploy_git Folder , And copy the generated files to this folder ​​.
     Insert picture description here
  • The third step , perform hexo clean after , Re execution hexo g,hexo g that will do .
    Found that the article was deleted successfully

Cause analysis

Because it's executing locally hexo g after , A will be generated in the root directory of the blog public Folder , The files in this folder are combined to form a complete static blog .

Then if you execute hexo d, It will public The contents of the folder are completely copied to .deploy_git Folder , And push all the files in the folder push To the remote library .

It will trigger Pages Service hook to build project , Then deploy to the website .

markdown The article is in the previous hexo g after , Copy the generated static file to .deploy_git file , but hexo clean Failed to delete ·.deploy_git· Inside markdown Static files for , So every time you deploy , It will come out .

So delete .deploy_git Folder is ok .

copyright notice
author[Xia ordinary],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/118/202204280553438475.html

Random recommended