Locally building and pushing jekyll site to github pages

前端 未结 3 1592
猫巷女王i
猫巷女王i 2021-01-03 11:55

I am using the gem \"jekyll-assets\" on my site and it fails when pushing to github pages. I have read that a way around this is to build the site locally, which builds just

3条回答
  •  臣服心动
    2021-01-03 12:41

    Here a windows batch file that pushes generated files back to github. Name it site_publish.bat and put it into the root of your project.

    @echo off
    cd /d "%~dp0"
    rmdir _site /s /q
    call jekyll build
    git --git-dir=.git --work-tree=_site add --all
    git --git-dir=.git --work-tree=_site commit -m "autogen: update site"
    git --git-dir=.git --work-tree=_site push
    

提交回复
热议问题