From 507ac65f8b69ffbf079deb5f74338bca86e24200 Mon Sep 17 00:00:00 2001 From: Mike McNeil Date: Mon, 6 May 2024 07:16:36 -0500 Subject: [PATCH] Website: Add missing pages to sitemap (#18762) --- website/api/controllers/download-sitemap.js | 42 ++++++++++++--------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/website/api/controllers/download-sitemap.js b/website/api/controllers/download-sitemap.js index 1488d4e626..7e10078554 100644 --- a/website/api/controllers/download-sitemap.js +++ b/website/api/controllers/download-sitemap.js @@ -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 +=`${_.escape(sails.config.custom.baseUrl+pageInfo.url)}${_.escape(new Date(pageInfo.lastModifiedAt).toJSON())}`; }//∞