11
2+ :: --------------------------------------------------------
3+ :: -- @author frankdevhub@163.com
4+ :: -- @Date 2019/04/03 Wednesday
5+ :: -- @description: generate sitemap and robot.txt
6+ :: --------------------------------------------------------
27
3- echo " ------------- jekyll build start -------------"
8+ set current_log_timestamp = " "
9+ :getLocalTimeStamp
410
11+ set date_timestamp_format = %1
12+ set time_timestamp_format = %2
513
6- echo " " ------------- jekyll build complete " -------------"
14+ if date_timestamp_format== 1
15+ current_log_timestamp=%DATE:~4 ,4 %%DATE:~9 ,2 %%DATE:~12 ,2 %
716
17+ if time_timestamp_format== 1
18+ current_log_timestamp=%TIME:~0 ,2 %%TIME:~3 ,2 %%TIME:~6 ,2 %
819
9- echo " ------------- cd into site package ------------"
10- echo " ------------- change 'localhost:4000' to website host -------------"
20+ goto :eof
1121
22+ @ echo 'start at call:getLocalTimeStamp 1 -1'
1223
13- echo " ------------- change complete -------------"
24+ :: --------------------------------------------------------
25+ :: -- @description: install plugin jekyll-sitemap
26+ :: --------------------------------------------------------
1427
28+ @ echo off
29+ setlocal enabledelayedexpansion
1530
16- echo " ------------- move sitemap.xml and robot.txt to main root -------------"
1731
32+ jekyll build & echo 'sss'
1833
19- echo " ------------- push git add ,git commit ,git push-------------"
2034
21- git add .
22- git commit -m " generate new sitemap"
23- git push -u origin master
2435
25- echo " ------------- sitemap created successfully -------------"
2636
27-
28-
29- pause
37+ & pause
0 commit comments