Website: Add missing pages to sitemap (#18762)

This commit is contained in:
Mike McNeil 2024-05-06 07:16:36 -05:00 committed by GitHub
parent 54adc3301a
commit 507ac65f8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,25 +43,32 @@ module.exports = {
// ╠═╣╠═╣║║║ ║║───║ ║ ║ ║║║╣ ║║ ╠═╝╠═╣║ ╦║╣ ╚═╗
// ╩ ╩╩ ╩╝╚╝═╩╝ ╚═╝╚═╝═╩╝╚═╝═╩╝ ╩ ╩ ╩╚═╝╚═╝╚═╝
let HAND_CODED_HTML_PAGES = [
'/',
'/company/contact',
'/queries',
'/',//« home page
'/pricing',
'/transparency',
'/docs',
'/logos',
'/reports/state-of-device-management',
'/releases',
'/success-stories',
'/securing',
'/engineering',
'/guides',
'/announcements',
'/report',
'/deploy',
'/podcasts',
'/device-management',
'/contact',
'/support',
'/integrations',
'/logos',// « brand usage guidelines
'/articles',// « overview page (individual article pages are dynamic)
'/releases',// « article category page
'/success-stories',// « article category page
'/securing',// « article category page
'/engineering',// « article category page
'/guides',// « article category page
'/announcements',// « article category page
'/deploy',// « article category page
'/podcasts',// « article category page
// Product category pages:
'/endpoint-ops',
'/device-management',
'/vulnerability-management',
// Other stuff:
// > Note: /handbook overview page is already included amongst the markdown pages
// > Note: Same for /docs
'/transparency',// « default transparency link, pointed at by Fleet Desktop
'/queries',// « overview page (all subpages are dynamic)
'/tables',// « overview page (all subpages are dynamic)
'/reports/state-of-device-management',// « 2021 research
// FUTURE: Do something smarter to get hand-coded HTML pages from routes.js, like how rebuild-cloud-sdk works, to avoid this manual duplication.
// See also https://github.com/sailshq/sailsjs.com/blob/b53c6e6a90c9afdf89e5cae00b9c9dd3f391b0e7/api/helpers/get-pages-for-sitemap.js#L27
];
@ -78,6 +85,7 @@ module.exports = {
// ╔╦╗╦ ╦╔╗╔╔═╗╔╦╗╦╔═╗ ╔═╗╔═╗╔═╗╔═╗╔═╗ ╔═╗╦═╗╔═╗╔╦╗ ╔╦╗╔═╗╦═╗╦╔═╔╦╗╔═╗╦ ╦╔╗╔
// ║║╚╦╝║║║╠═╣║║║║║ ╠═╝╠═╣║ ╦║╣ ╚═╗ ╠╣ ╠╦╝║ ║║║║ ║║║╠═╣╠╦╝╠╩╗ ║║║ ║║║║║║║
// ═╩╝ ╩ ╝╚╝╩ ╩╩ ╩╩╚═╝ ╩ ╩ ╩╚═╝╚═╝╚═╝ ╚ ╩╚═╚═╝╩ ╩ ╩ ╩╩ ╩╩╚═╩ ╩═╩╝╚═╝╚╩╝╝╚╝
// (includes data table documentation pages; i.e. `/tables/*`)
for (let pageInfo of sails.config.builtStaticContent.markdownPages) {
sitemapXml +=`<url><loc>${_.escape(sails.config.custom.baseUrl+pageInfo.url)}</loc><lastmod>${_.escape(new Date(pageInfo.lastModifiedAt).toJSON())}</lastmod></url>`;
}//∞