mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Website: Add missing pages to sitemap (#18762)
This commit is contained in:
parent
54adc3301a
commit
507ac65f8b
1 changed files with 25 additions and 17 deletions
42
website/api/controllers/download-sitemap.js
vendored
42
website/api/controllers/download-sitemap.js
vendored
|
|
@ -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>`;
|
||||
}//∞
|
||||
|
|
|
|||
Loading…
Reference in a new issue