Skip to content

Commit 0d20011

Browse files
-
1 parent eab2e98 commit 0d20011

File tree

2 files changed

+67
-11
lines changed

2 files changed

+67
-11
lines changed

gulpfile.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,24 @@ gulp.task('make-sitemap', function (done) {
9090
// </xml>
9191
let listStr = ''
9292
const parseList = (v)=>{
93-
v['list'].forEach(v2 => {
93+
if(v['href']){
9494
listStr += `
9595
<url>
96-
<loc>https://redcamel.github.io/RedGL2/example/${v2['href']}</loc>
96+
<loc>https://redcamel.github.io/RedGL2/example/${v['href']}</loc>
9797
<changefreq>weekly</changefreq>
9898
<priority>0.5</priority>
9999
</url>
100100
`
101-
})
102-
}
103-
t0.forEach(v => {
104-
if(v['list']) parseList(v)
101+
}
105102

106-
})
103+
if(v['list']){
104+
v['list'].forEach(v2 => parseList(v2))
105+
}
106+
107+
}
108+
t0.forEach(v => parseList(v))
107109
const result = `<?xml version="1.0" encoding="UTF-8"?>
108-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
110+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
109111
${listStr}
110112
</urlset>`
111113
var file = 'sitemap.xml';

sitemap.xml

+57-3
Original file line numberDiff line numberDiff line change
@@ -512,19 +512,73 @@
512512
</url>
513513

514514
<url>
515-
<loc>https://redcamel.github.io/RedGL2/example/undefined</loc>
515+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/adjustments/RedPostEffect_BrightnessContrast.html</loc>
516516
<changefreq>weekly</changefreq>
517517
<priority>0.5</priority>
518518
</url>
519519

520520
<url>
521-
<loc>https://redcamel.github.io/RedGL2/example/undefined</loc>
521+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/adjustments/RedPostEffect_Threshold.html</loc>
522522
<changefreq>weekly</changefreq>
523523
<priority>0.5</priority>
524524
</url>
525525

526526
<url>
527-
<loc>https://redcamel.github.io/RedGL2/example/undefined</loc>
527+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/adjustments/RedPostEffect_Invert.html</loc>
528+
<changefreq>weekly</changefreq>
529+
<priority>0.5</priority>
530+
</url>
531+
532+
<url>
533+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/adjustments/RedPostEffect_Gray.html</loc>
534+
<changefreq>weekly</changefreq>
535+
<priority>0.5</priority>
536+
</url>
537+
538+
<url>
539+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/adjustments/RedPostEffect_HueSaturation.html</loc>
540+
<changefreq>weekly</changefreq>
541+
<priority>0.5</priority>
542+
</url>
543+
544+
<url>
545+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/blur/RedPostEffect_Blur.html</loc>
546+
<changefreq>weekly</changefreq>
547+
<priority>0.5</priority>
548+
</url>
549+
550+
<url>
551+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/blur/RedPostEffect_BlurX.html</loc>
552+
<changefreq>weekly</changefreq>
553+
<priority>0.5</priority>
554+
</url>
555+
556+
<url>
557+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/blur/RedPostEffect_BlurY.html</loc>
558+
<changefreq>weekly</changefreq>
559+
<priority>0.5</priority>
560+
</url>
561+
562+
<url>
563+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/blur/RedPostEffect_GaussianBlur.html</loc>
564+
<changefreq>weekly</changefreq>
565+
<priority>0.5</priority>
566+
</url>
567+
568+
<url>
569+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/blur/RedPostEffect_ZoomBlur.html</loc>
570+
<changefreq>weekly</changefreq>
571+
<priority>0.5</priority>
572+
</url>
573+
574+
<url>
575+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/pixelate/RedPostEffect_HalfTone.html</loc>
576+
<changefreq>weekly</changefreq>
577+
<priority>0.5</priority>
578+
</url>
579+
580+
<url>
581+
<loc>https://redcamel.github.io/RedGL2/example/postEffect/pixelate/RedPostEffect_Pixelize.html</loc>
528582
<changefreq>weekly</changefreq>
529583
<priority>0.5</priority>
530584
</url>

0 commit comments

Comments
 (0)