${_.escape(code)}
`;
} else if(infostring === 'js') {// Interpret `js` as `javascript`
- return `${_.escape(code)}
`;
+ return `${_.escape(code)}
`;
} else if(infostring === 'bash' || infostring === 'sh') {// Interpret `sh` and `bash` as `bash`
- return `${_.escape(code)}
`;
+ return `${_.escape(code)}
`;
} else if(infostring !== '') {// leaving the code language as-is if the infoString is anything else.
- return `${_.escape(code)}
`;
+ return `${_.escape(code)}
`;
} else {// When unspecified, default to `text`
- return `${_.escape(code)}
`;
+ return `${_.escape(code)}
`;
}
};
diff --git a/website/api/hooks/custom/index.js b/website/api/hooks/custom/index.js
index 5a46166252cc..0e4f592f0537 100644
--- a/website/api/hooks/custom/index.js
+++ b/website/api/hooks/custom/index.js
@@ -70,11 +70,6 @@ will be disabled and/or hidden in the UI.
// This will determine whether or not to enable various billing features.
sails.config.custom.enableBillingFeatures = !isMissingStripeConfig;
-
- // Override the default sails.LOOKS_LIKE_ASSET_RX with a regex that does not match paths starting with '/release/'.
- // Otherwise, our release blog posts are treated as assets because they contain periods in their URL (e.g., fleetdm.com/releases/fleet-4.29.0)
- sails.LOOKS_LIKE_ASSET_RX = /^(?!\/releases\/|\/announcements\/|\/success-stories\/|\/securing\/|\/engineering\/|\/podcasts\/*$)[^?]*\/[^?\/]+\.[^?\/]+(\?.*)?$/;
-
// After "sails-hook-organics" finishes initializing, configure Stripe
// and Sendgrid packs with any available credentials.
sails.after('hook:organics:loaded', ()=>{
diff --git a/website/assets/js/pages/articles/articles.page.js b/website/assets/js/pages/articles/articles.page.js
index cf15625714f4..a24be4a2d865 100644
--- a/website/assets/js/pages/articles/articles.page.js
+++ b/website/assets/js/pages/articles/articles.page.js
@@ -50,7 +50,7 @@ parasails.registerPage('articles', {
this.articleCategory = 'Reports';
this.categoryDescription = '';
break;
- case 'all':
+ case 'articles':
this.articleCategory = 'Articles';
this.categoryDescription = 'Read the latest articles from the Fleet team and community.';
break;
diff --git a/website/config/routes.js b/website/config/routes.js
index 503f9f5c7f29..6293d097c4e3 100644
--- a/website/config/routes.js
+++ b/website/config/routes.js
@@ -73,15 +73,142 @@ module.exports.routes = {
}
},
- 'r|^/((success-stories|securing|releases|engineering|guides|announcements|podcasts|report|deploy)/(.+))$|': {
+ 'GET /articles': {
+ skipAssets: false,
+ action: 'articles/view-articles',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },
+
+ 'GET /success-stories': {
+ skipAssets: false,
+ action: 'articles/view-articles',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },
+
+ 'GET /success-stories/*': {
+ skipAssets: false,
+ action: 'articles/view-basic-article',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },// handles /success-stores/foo
+
+ 'GET /securing': {
+ skipAssets: false,
+ action: 'articles/view-articles',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },
+
+ 'GET /securing/*': {
skipAssets: false,
action: 'articles/view-basic-article',// Meta title and description set in view action
- },// Handles /device-management/foo, /securing/foo, /releases/foo, /engineering/foo, /guides/foo, /announcements/foo, /deploy/foo, /podcasts/foo, /report/foo
+ locals: {
+ currentSection: 'community',
+ }
+ },// handles /securing/foo
- 'r|^/((success-stories|securing|releases|engineering|guides|announcements|articles|podcasts|report|deploy))/*$|category': {
+ 'GET /releases': {
skipAssets: false,
action: 'articles/view-articles',// Meta title and description set in view action
- },// Handles the article landing page /articles, and the article cateogry pages (e.g. /device-management, /securing, /releases, etc)
+ locals: {
+ currentSection: 'documentation',
+ }
+ },
+
+ 'GET /releases/*': {
+ skipAssets: false,
+ action: 'articles/view-basic-article',// Meta title and description set in view action
+ locals: {
+ currentSection: 'documentation',
+ }
+ },// handles /releases/foo
+
+ 'GET /guides': {
+ skipAssets: false,
+ action: 'articles/view-articles',// Meta title and description set in view action
+ locals: {
+ currentSection: 'documentation',
+ }
+ },
+
+ 'GET /guides/*': {
+ skipAssets: false,
+ action: 'articles/view-basic-article',// Meta title and description set in view action
+ locals: {
+ currentSection: 'documentation',
+ }
+ },// handles /guides/foo
+
+ 'GET /announcements': {
+ skipAssets: false,
+ action: 'articles/view-articles',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },
+
+ 'GET /announcements/*': {
+ skipAssets: false,
+ action: 'articles/view-basic-article',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },// handles /announcements/foo
+
+ 'GET /podcasts': {
+ skipAssets: false,
+ action: 'articles/view-articles',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },
+
+ 'GET /podcasts/*': {
+ skipAssets: false,
+ action: 'articles/view-basic-article',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },// handles /podcasts/foo
+
+ 'GET /engineering': {
+ skipAssets: false,
+ action: 'articles/view-articles',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },
+
+ 'GET /engineering/*': {
+ skipAssets: false,
+ action: 'articles/view-basic-article',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },// handles /engineering/foo
+
+ 'GET /report': {
+ skipAssets: false,
+ action: 'articles/view-articles',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },
+
+ 'GET /report/*': {
+ skipAssets: false,
+ action: 'articles/view-basic-article',// Meta title and description set in view action
+ locals: {
+ currentSection: 'community',
+ }
+ },// handles /engineering/foo
+
'GET /docs/?*': {
skipAssets: false,
@@ -520,6 +647,81 @@ module.exports.routes = {
'GET /guides/how-to-uninstall-osquery': (req,res)=> { return res.redirect(301, '/guides/how-to-uninstall-fleetd');},
'GET /guides/sysadmin-diaries-lost-device': (req,res)=> { return res.redirect(301, '/guides/lock-wipe-hosts');},
+ // Release note article redirects.
+ 'GET /releases/fleet-3.10.0': '/releases/fleet-3-10-0',
+ 'GET /releases/fleet-3.12.0': '/releases/fleet-3-12-0',
+ 'GET /releases/fleet-3.13.0': '/releases/fleet-3-13-0',
+ 'GET /releases/fleet-3.5.0': '/releases/fleet-3-5-0',
+ 'GET /releases/fleet-3.6.0': '/releases/fleet-3-6-0',
+ 'GET /releases/fleet-3.7.1': '/releases/fleet-3-7-1',
+ 'GET /releases/fleet-3.8.0': '/releases/fleet-3-8-0',
+ 'GET /releases/fleet-3.9.0': '/releases/fleet-3-9-0',
+ 'GET /releases/fleet-4.0.0': '/releases/fleet-4-0-0',
+ 'GET /releases/fleet-4.1.0': '/releases/fleet-4-1-0',
+ 'GET /releases/fleet-4.10.0': '/releases/fleet-4-10-0',
+ 'GET /releases/fleet-4.12.0': '/releases/fleet-4-12-0',
+ 'GET /releases/fleet-4.11.0': '/releases/fleet-4-11-0',
+ 'GET /releases/fleet-4.13.0': '/releases/fleet-4-13-0',
+ 'GET /releases/fleet-4.15.0': '/releases/fleet-4-15-0',
+ 'GET /releases/fleet-3.11.0': '/releases/fleet-3-11-0',
+ 'GET /releases/fleet-4.16.0': '/releases/fleet-4-16-0',
+ 'GET /releases/fleet-4.17.0': '/releases/fleet-4-17-0',
+ 'GET /releases/fleet-4.18.0': '/releases/fleet-4-18-0',
+ 'GET /releases/fleet-4.19.0': '/releases/fleet-4-19-0',
+ 'GET /releases/fleet-4.2.0': '/releases/fleet-4-2-0',
+ 'GET /releases/fleet-4.21.0': '/releases/fleet-4-21-0',
+ 'GET /releases/fleet-4.14.0': '/releases/fleet-4-14-0',
+ 'GET /releases/fleet-4.22.0': '/releases/fleet-4-22-0',
+ 'GET /releases/fleet-4.20.0': '/releases/fleet-4-20-0',
+ 'GET /releases/fleet-4.23.0': '/releases/fleet-4-23-0',
+ 'GET /releases/fleet-4.24.0': '/releases/fleet-4-24-0',
+ 'GET /releases/fleet-4.25.0': '/releases/fleet-4-25-0',
+ 'GET /releases/fleet-4.27.0': '/releases/fleet-4-27-0',
+ 'GET /releases/fleet-4.26.0': '/releases/fleet-4-26-0',
+ 'GET /releases/fleet-4.28.0': '/releases/fleet-4-28-0',
+ 'GET /releases/fleet-4.29.0': '/releases/fleet-4-29-0',
+ 'GET /releases/fleet-4.30.0': '/releases/fleet-4-30-0',
+ 'GET /releases/fleet-4.31.0': '/releases/fleet-4-31-0',
+ 'GET /releases/fleet-4.3.0': '/releases/fleet-4-3-0',
+ 'GET /releases/fleet-4.32.0': '/releases/fleet-4-32-0',
+ 'GET /releases/fleet-4.33.0': '/releases/fleet-4-33-0',
+ 'GET /releases/fleet-4.34.0': '/releases/fleet-4-34-0',
+ 'GET /releases/fleet-4.36.0': '/releases/fleet-4-36-0',
+ 'GET /releases/fleet-4.38.0': '/releases/fleet-4-38-0',
+ 'GET /releases/fleet-4.39.0': '/releases/fleet-4-39-0',
+ 'GET /releases/fleet-4.35.0': '/releases/fleet-4-35-0',
+ 'GET /releases/fleet-4.4.0': '/releases/fleet-4-4-0',
+ 'GET /releases/fleet-4.37.0': '/releases/fleet-4-37-0',
+ 'GET /releases/fleet-4.40.0': '/releases/fleet-4-40-0',
+ 'GET /releases/fleet-4.42.0': '/releases/fleet-4-42-0',
+ 'GET /releases/fleet-4.43.0': '/releases/fleet-4-43-0',
+ 'GET /releases/fleet-4.44.0': '/releases/fleet-4-44-0',
+ 'GET /releases/fleet-4.41.0': '/releases/fleet-4-41-0',
+ 'GET /releases/fleet-4.45.0': '/releases/fleet-4-45-0',
+ 'GET /releases/fleet-4.46.0': '/releases/fleet-4-46-0',
+ 'GET /releases/fleet-4.47.0': '/releases/fleet-4-47-0',
+ 'GET /releases/fleet-4.49.0': '/releases/fleet-4-49-0',
+ 'GET /releases/fleet-4.5.0': '/releases/fleet-4-5-0',
+ 'GET /releases/fleet-4.50.0': '/releases/fleet-4-50-0',
+ 'GET /releases/fleet-4.51.0': '/releases/fleet-4-51-0',
+ 'GET /releases/fleet-4.48.0': '/releases/fleet-4-48-0',
+ 'GET /releases/fleet-4.53.0': '/releases/fleet-4-53-0',
+ 'GET /releases/fleet-4.55.0': '/releases/fleet-4-55-0',
+ 'GET /releases/fleet-4.56.0': '/releases/fleet-4-56-0',
+ 'GET /releases/fleet-4.54.0': '/releases/fleet-4-54-0',
+ 'GET /releases/fleet-4.58.0': '/releases/fleet-4-58-0',
+ 'GET /releases/fleet-4.59.0': '/releases/fleet-4-59-0',
+ 'GET /releases/fleet-4.57.0': '/releases/fleet-4-57-0',
+ 'GET /releases/fleet-4.6.0': '/releases/fleet-4-6-0',
+ 'GET /releases/fleet-4.60.0': '/releases/fleet-4-60-0',
+ 'GET /releases/fleet-4.7.0': '/releases/fleet-4-7-0',
+ 'GET /releases/fleet-4.8.0': '/releases/fleet-4-8-0',
+ 'GET /releases/fleet-4.61.0': '/releases/fleet-4-61-0',
+ 'GET /releases/fleet-4.9.0': '/releases/fleet-4-9-0',
+ 'GET /announcements/nvd-api-2.0': '/announcements/nvd-api-2-0',
+ 'GET /releases/osquery-5.11.0': '/releases/osquery-5-11-0',
+ 'GET /releases/osquery-5.8.1': '/releases/osquery-5-8-1',
+
// ╔╦╗╦╔═╗╔═╗ ╦═╗╔═╗╔╦╗╦╦═╗╔═╗╔═╗╔╦╗╔═╗ ┬ ╔╦╗╔═╗╦ ╦╔╗╔╦ ╔═╗╔═╗╔╦╗╔═╗
// ║║║║╚═╗║ ╠╦╝║╣ ║║║╠╦╝║╣ ║ ║ ╚═╗ ┌┼─ ║║║ ║║║║║║║║ ║ ║╠═╣ ║║╚═╗
// ╩ ╩╩╚═╝╚═╝ ╩╚═╚═╝═╩╝╩╩╚═╚═╝╚═╝ ╩ ╚═╝ └┘ ═╩╝╚═╝╚╩╝╝╚╝╩═╝╚═╝╩ ╩═╩╝╚═╝
diff --git a/website/scripts/build-static-content.js b/website/scripts/build-static-content.js
index 104264662a4f..0c0c7dff2d3f 100644
--- a/website/scripts/build-static-content.js
+++ b/website/scripts/build-static-content.js
@@ -259,10 +259,11 @@ module.exports = {
if(mdString.match(/(-|\d\.)\s.*\n\n+])\n+(>)/g, '$1$2'); // « Removes any newlines that might exist before the closing `>` when the This group is intended for anyone who supports or manages a group of Macs or iOS devices of any size (from less than a dozen to ten of thousands) for an institution of any stripe (Small/Medium Business, Non-profit, Enterprise, Education) in the Greater Philadelphia area (South Eastern PA, South Jersey, Delaware) to swap ideas and solutions, network, and hang out.
-