Skip to content

Commit ede5f6f

Browse files
committed
generate sitemap.xml and robot.txt and push to origin
1 parent d5c7d10 commit ede5f6f

3 files changed

Lines changed: 238 additions & 12 deletions

File tree

robots.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Sitemap: https://frankdevhub.github.io/sitemap.xml

sitemap.bat

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
@ECHO OFF
23
SETLOCAL ENABLEDELAYEDEXPANSION
34

45
::--------------------------------------------------------
@@ -7,31 +8,72 @@ SETLOCAL ENABLEDELAYEDEXPANSION
78
::-- @description: generate sitemap and robot.txt
89
::--------------------------------------------------------
910

10-
set current_log_timestamp=" "
11-
:getLocalTimeStamp
11+
set "current_log_timestamp= "
1212

13-
set date_timestamp_format="%1"
14-
set time_timestamp_format="%2"
13+
@echo 'start'
1514

16-
if date_timestamp_format==1
17-
current_log_timestamp=%DATE:~4,4%%DATE:~9,2%%DATE:~12,2%
15+
::--------------------------------------------------------
16+
::-- @description: install plugin jekyll-sitemap
17+
::--------------------------------------------------------
1818

19-
if time_timestamp_format==1
20-
current_log_timestamp=%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%
19+
/wait gem install jekyll-sitemap
2120

22-
GOTO:EOF
21+
/wait jekyll build & echo "jekyll build complete"
22+
/wait call:replceHostConfig
2323

24-
@echo 'start at call:getLocalTimeStamp 1 -1'
24+
git add .
25+
git commit -m "generate sitemap.xml and robot.txt and push to origin"
26+
git push -u origin master
2527

2628
::--------------------------------------------------------
27-
::-- @description: install plugin jekyll-sitemap
29+
::-- Function section starts below here
2830
::--------------------------------------------------------
2931

32+
:getLocalTimeStamp
33+
34+
set date_timestamp_format=%1
35+
set time_timestamp_format=%2
36+
37+
if date_timestamp_format==1 (
38+
set current_log_timestamp=%DATE:~4,4%%DATE:~9,2%%DATE:~12,2%
39+
) else (
40+
set current_log_timestamp=%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%
41+
)
42+
43+
GOTO:EOF
44+
3045

3146

32-
jekyll build &echo '---------jekyll build complete---------'
47+
:replceHostConfig
3348

49+
set "root=%~dp0"
50+
echo "current_path:%root%"
51+
52+
set "site_file_sitemap=\_site\sitemap.xml"
53+
set "site_file_robot=\_site\robots.txt"
54+
set "root_file_sitemap=sitemap.xml"
55+
set "root_robot=robot.txt"
56+
57+
set source_sitemap_path=%root%%site_file_sitemap%
58+
59+
set source_robot_path=%root%%site_file_robot%
60+
61+
:: (
62+
:: for /f "tokens=*" %%i in (%site_file_sitemap%) do (
63+
:: set s=%%i
64+
:: set s=!s:localhost:4000=www.frankdevhub.site!
65+
:: echo !s!
66+
:: )
67+
:: )>%root_file_sitemap%
68+
69+
70+
copy %source_sitemap_path% %root%
71+
copy %source_robot_path% %root%
72+
echo '---------set sitemap configuations complete---------'
73+
GOTO:EOF
3474

3575
echo error
3676

77+
78+
3779
PAUSE

sitemap.xml

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3+
<url>
4+
<loc>https://frankdevhub.github.io/2015/02/10/welcome-to-jekyll/</loc>
5+
<lastmod>2015-02-10T23:14:54+08:00</lastmod>
6+
</url>
7+
<url>
8+
<loc>https://frankdevhub.github.io/2015/02/16/create-my-blog-with-jekyll/</loc>
9+
<lastmod>2015-02-16T06:14:54+08:00</lastmod>
10+
</url>
11+
<url>
12+
<loc>https://frankdevhub.github.io/2015/03/21/teach-girlfriend-html-css/</loc>
13+
<lastmod>2015-03-21T23:14:54+08:00</lastmod>
14+
</url>
15+
<url>
16+
<loc>https://frankdevhub.github.io/2015/03/26/sublimeLinter/</loc>
17+
<lastmod>2015-03-26T23:14:54+08:00</lastmod>
18+
</url>
19+
<url>
20+
<loc>https://frankdevhub.github.io/2015/04/06/arrays-similar/</loc>
21+
<lastmod>2015-04-06T23:14:54+08:00</lastmod>
22+
</url>
23+
<url>
24+
<loc>https://frankdevhub.github.io/2015/04/12/Syncing-a-fork/</loc>
25+
<lastmod>2015-04-12T23:14:54+08:00</lastmod>
26+
</url>
27+
<url>
28+
<loc>https://frankdevhub.github.io/2015/04/16/baidu-ife-1/</loc>
29+
<lastmod>2015-04-16T03:06:05+08:00</lastmod>
30+
</url>
31+
<url>
32+
<loc>https://frankdevhub.github.io/2015/04/23/baidu-ife-2-javascript/</loc>
33+
<lastmod>2015-04-23T03:06:05+08:00</lastmod>
34+
</url>
35+
<url>
36+
<loc>https://frankdevhub.github.io/2015/05/18/front-end-tools/</loc>
37+
<lastmod>2015-05-18T22:06:05+08:00</lastmod>
38+
</url>
39+
<url>
40+
<loc>https://frankdevhub.github.io/2015/05/20/scope/</loc>
41+
<lastmod>2015-05-20T22:06:05+08:00</lastmod>
42+
</url>
43+
<url>
44+
<loc>https://frankdevhub.github.io/2015/06/01/lenovo-front-end-interview/</loc>
45+
<lastmod>2015-06-01T22:06:05+08:00</lastmod>
46+
</url>
47+
<url>
48+
<loc>https://frankdevhub.github.io/2015/06/11/JavaScript-function/</loc>
49+
<lastmod>2015-06-11T22:06:05+08:00</lastmod>
50+
</url>
51+
<url>
52+
<loc>https://frankdevhub.github.io/2015/06/12/JavaScript-this/</loc>
53+
<lastmod>2015-06-12T22:06:05+08:00</lastmod>
54+
</url>
55+
<url>
56+
<loc>https://frankdevhub.github.io/2015/06/14/JavaScript-closure/</loc>
57+
<lastmod>2015-06-14T22:06:05+08:00</lastmod>
58+
</url>
59+
<url>
60+
<loc>https://frankdevhub.github.io/2015/06/15/JavaScript-Object-Oriented/</loc>
61+
<lastmod>2015-06-15T22:06:05+08:00</lastmod>
62+
</url>
63+
<url>
64+
<loc>https://frankdevhub.github.io/2015/06/17/web-app/</loc>
65+
<lastmod>2015-06-17T22:06:05+08:00</lastmod>
66+
</url>
67+
<url>
68+
<loc>https://frankdevhub.github.io/2015/06/18/weinre/</loc>
69+
<lastmod>2015-06-18T08:06:05+08:00</lastmod>
70+
</url>
71+
<url>
72+
<loc>https://frankdevhub.github.io/2015/07/09/JavaScript-Net/</loc>
73+
<lastmod>2015-07-09T08:06:05+08:00</lastmod>
74+
</url>
75+
<url>
76+
<loc>https://frankdevhub.github.io/2015/07/24/low-IE-click-empty-block-bug/</loc>
77+
<lastmod>2015-07-24T08:06:05+08:00</lastmod>
78+
</url>
79+
<url>
80+
<loc>https://frankdevhub.github.io/2016/01/01/History-API/</loc>
81+
<lastmod>2016-01-01T07:06:05+08:00</lastmod>
82+
</url>
83+
<url>
84+
<loc>https://frankdevhub.github.io/2016/03/12/jekyll-theme-version-2.0/</loc>
85+
<lastmod>2016-03-12T11:40:18+08:00</lastmod>
86+
</url>
87+
<url>
88+
<loc>https://frankdevhub.github.io/2016/05/06/regular-expression-group/</loc>
89+
<lastmod>2016-05-06T11:40:18+08:00</lastmod>
90+
</url>
91+
<url>
92+
<loc>https://frankdevhub.github.io/2016/06/07/JavaScript-good-parts-note1/</loc>
93+
<lastmod>2016-06-07T00:00:00+08:00</lastmod>
94+
</url>
95+
<url>
96+
<loc>https://frankdevhub.github.io/2016/06/08/JavaScript-good-parts-note2/</loc>
97+
<lastmod>2016-06-08T00:00:00+08:00</lastmod>
98+
</url>
99+
<url>
100+
<loc>https://frankdevhub.github.io/2016/06/10/JavaScript-good-parts-note3/</loc>
101+
<lastmod>2016-06-10T00:00:00+08:00</lastmod>
102+
</url>
103+
<url>
104+
<loc>https://frankdevhub.github.io/2016/06/14/how-to-use-babel/</loc>
105+
<lastmod>2016-06-14T00:00:00+08:00</lastmod>
106+
</url>
107+
<url>
108+
<loc>https://frankdevhub.github.io/2016/07/07/git-clone-not-master-branch/</loc>
109+
<lastmod>2016-07-07T00:00:00+08:00</lastmod>
110+
</url>
111+
<url>
112+
<loc>https://frankdevhub.github.io/2016/10/16/shuffle-algorithm/</loc>
113+
<lastmod>2016-10-16T00:00:00+08:00</lastmod>
114+
</url>
115+
<url>
116+
<loc>https://frankdevhub.github.io/2016/11/22/js-create-file-and-download/</loc>
117+
<lastmod>2016-11-22T00:00:00+08:00</lastmod>
118+
</url>
119+
<url>
120+
<loc>https://frankdevhub.github.io/2016/11/25/how-to-write-a-count-down/</loc>
121+
<lastmod>2016-11-25T00:00:00+08:00</lastmod>
122+
</url>
123+
<url>
124+
<loc>https://frankdevhub.github.io/2018/06/01/animation/</loc>
125+
<lastmod>2018-06-01T00:00:00+08:00</lastmod>
126+
</url>
127+
<url>
128+
<loc>https://frankdevhub.github.io/2018/09/10/lottie/</loc>
129+
<lastmod>2018-09-10T00:00:00+08:00</lastmod>
130+
</url>
131+
<url>
132+
<loc>https://frankdevhub.github.io/2018/10/03/guam-4200m-skydive/</loc>
133+
<lastmod>2018-10-03T20:01:09+08:00</lastmod>
134+
</url>
135+
<url>
136+
<loc>https://frankdevhub.github.io/2018/10/10/vscode-plugin-schedule/</loc>
137+
<lastmod>2018-10-10T00:00:00+08:00</lastmod>
138+
</url>
139+
<url>
140+
<loc>https://frankdevhub.github.io/2019/03/29/the-lengend-american-sniper/</loc>
141+
<lastmod>2019-03-29T17:19:03+08:00</lastmod>
142+
</url>
143+
<url>
144+
<loc>https://frankdevhub.github.io/2019/03/31/three-year-experience-programmer-standard/</loc>
145+
<lastmod>2019-03-31T12:04:01+08:00</lastmod>
146+
</url>
147+
<url>
148+
<loc>https://frankdevhub.github.io/archive/</loc>
149+
</url>
150+
<url>
151+
<loc>https://frankdevhub.github.io/category/</loc>
152+
</url>
153+
<url>
154+
<loc>https://frankdevhub.github.io/tag/</loc>
155+
</url>
156+
<url>
157+
<loc>https://frankdevhub.github.io/collection/</loc>
158+
</url>
159+
<url>
160+
<loc>https://frankdevhub.github.io/life/</loc>
161+
</url>
162+
<url>
163+
<loc>https://frankdevhub.github.io/about/</loc>
164+
</url>
165+
<url>
166+
<loc>https://frankdevhub.github.io/</loc>
167+
</url>
168+
<url>
169+
<loc>https://frankdevhub.github.io/page2/</loc>
170+
</url>
171+
<url>
172+
<loc>https://frankdevhub.github.io/page3/</loc>
173+
</url>
174+
<url>
175+
<loc>https://frankdevhub.github.io/page4/</loc>
176+
</url>
177+
<url>
178+
<loc>https://frankdevhub.github.io/page5/</loc>
179+
</url>
180+
<url>
181+
<loc>https://frankdevhub.github.io/page6/</loc>
182+
</url>
183+
</urlset>

0 commit comments

Comments
 (0)