Sitemap: Fix lastmod date format
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const fetch = require('node-fetch')
|
const fetch = require('node-fetch')
|
||||||
import { apiEndpoints } from 'utils/store'
|
import { apiEndpoints } from 'utils/store'
|
||||||
|
import { formatDate } from 'utils/functions'
|
||||||
|
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
@@ -35,9 +36,10 @@ const render = (pages, locations) => {
|
|||||||
<url>
|
<url>
|
||||||
<loc>${baseURL}/location/${loc.country.slug}/${loc.slug}</loc>
|
<loc>${baseURL}/location/${loc.country.slug}/${loc.slug}</loc>
|
||||||
<priority>1</priority>
|
<priority>1</priority>
|
||||||
<lastmod>${loc.updated}</lastmod>
|
<lastmod>${formatDate(loc.updated, 'DATETIME')}</lastmod>
|
||||||
<changefreq>weekly</changefreq>
|
<changefreq>weekly</changefreq>
|
||||||
</url>`).join('\n')}
|
</url>`).join('\n')
|
||||||
|
}
|
||||||
</urlset>`
|
</urlset>`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user