Files
Eric 48f8fb733e Website: add /download page (#45504)
Closes: https://github.com/fleetdm/fleet/issues/43242

Changes:
- Added /download, a page that has links to download the fleetctl
installers included in the latest release
- Updated the build-static-content script to send a request to GitHub to
get the download URLs of the latest released fleetctl installers.
- Update the parallax-city component to support a new prop that removes
the component's background when set.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a dedicated /download page with platform-specific installer
links, FAQ accordion, and copy-to-clipboard for code snippets (copy
buttons removed if unsupported).
  * Added shortlink redirect from /downloads → /download.
  * Sitemap now includes /download for better discoverability.

* **Style**
* New page styles and component styles, plus an option to render the
parallax city without a background.

* **Chores**
* Build now fetches and populates installer URLs automatically; the
download route is publicly accessible.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/fleetdm/fleet/pull/45504)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-14 12:41:27 -05:00

42 lines
961 B
JavaScript
Vendored

module.exports = {
friendlyName: 'View download',
description: 'Display "Download" page.',
exits: {
success: {
viewTemplatePath: 'pages/download'
},
badConfig: { responseType: 'badConfig' },
},
fn: async function () {
if (!_.isObject(sails.config.builtStaticContent) || !_.isObject(sails.config.builtStaticContent.fleetctlDownloadUrls)) {
throw {badConfig: 'builtStaticContent.fleetctlDownloadUrls'};
}
let fleetctlDownloadUrls = sails.config.builtStaticContent.fleetctlDownloadUrls;
if(!_.isString(fleetctlDownloadUrls.macOs) || !_.isString(fleetctlDownloadUrls.windows) || !_.isString(fleetctlDownloadUrls.windowsArm)) {
throw {badConfig: 'builtStaticContent.fleetctlDownloadUrls'};
}
return {
macOsDownloadUrl: fleetctlDownloadUrls.macOs,
windowsDownloadUrl: fleetctlDownloadUrls.windows,
windowsArmDownloadUrl: fleetctlDownloadUrls.windowsArm,
};
}
};