Skip to content

Commit 7115c06

Browse files
authored
Update generate-sitemap.js
1 parent 1e31389 commit 7115c06

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

generate-sitemap.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ function generateSitemap(files) {
2828

2929
files.forEach(function(file) {
3030
const url = 'https://clashv2rayu.github.io/' + file.replace('./', ''); // Update URL as needed
31-
xml += `\t<url>\n\t\t<loc>${url}</loc>\n\t</url>\n`;
31+
const lastmod = new Date().toISOString().split('T')[0]; // Current date as lastmod
32+
33+
34+
xml += `\t<url>\n\t\t<loc>${url}</loc>\n\t\t<lastmod>${lastmod}</lastmod>\n\t\t</url>\n`;
3235
});
3336

3437
xml += '</urlset>';

0 commit comments

Comments
 (0)