Skip to content

Commit 804c77a

Browse files
authored
Merge branch 'master' into M-DEV-1/replace-images-on-colors-page
2 parents 37e12b2 + a1f0575 commit 804c77a

217 files changed

Lines changed: 3413 additions & 470 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ area/learn:
5151
- "src/components/Learn-Components/**/*"
5252
- "src/collections/service-mesh-books/**/*"
5353
- "src/collections/service-mesh-learn/**/*"
54-
- "src/collections/service-mesh-workshops/**/*"
54+
- "src/collections/workshops/**/*"
5555
- "src/templates/book-*.js"
5656
- "src/templates/course-*.js"
5757
- "src/templates/lab-*.js"

gatsby-config.js

Lines changed: 99 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,28 @@ module.exports = {
1313
},
1414
flags: {
1515
FAST_DEV: true,
16-
PARALLEL_SOURCING: true
16+
PARALLEL_SOURCING: true,
1717
},
1818
trailingSlash: "never",
1919
plugins: [
20+
{
21+
resolve: "gatsby-plugin-netlify",
22+
options: {
23+
headers: {
24+
"/*": [
25+
"X-Frame-Options: SAMEORIGIN",
26+
"Content-Security-Policy: frame-ancestors 'self'",
27+
],
28+
},
29+
mergeSecurityHeaders: true,
30+
mergeCachingHeaders: true,
31+
},
32+
},
2033
{
2134
resolve: "gatsby-plugin-webpack-bundle-analyser-v2",
2235
options: {
23-
disable: true
24-
}
36+
disable: true,
37+
},
2538
},
2639
{
2740
resolve: "gatsby-plugin-sitemap",
@@ -41,10 +54,8 @@ module.exports = {
4154
}
4255
}
4356
`,
44-
resolvePages: ({
45-
allSitePage: { nodes: allPages },
46-
}) => {
47-
return allPages.map(page => {
57+
resolvePages: ({ allSitePage: { nodes: allPages } }) => {
58+
return allPages.map((page) => {
4859
return { ...page };
4960
});
5061
},
@@ -73,8 +84,8 @@ module.exports = {
7384
// or disable plugins
7485
inlineStyles: false,
7586
cleanupIds: false,
76-
}
77-
}
87+
},
88+
},
7889
},
7990
],
8091
},
@@ -287,7 +298,71 @@ module.exports = {
287298
},
288299
{
289300
serialize: ({ query: { site, allPosts } }) => {
290-
return allPosts.nodes.map(node => {
301+
return allPosts.nodes.map((node) => {
302+
return Object.assign({}, node.frontmatter, {
303+
title: node.frontmatter.title,
304+
author: node.frontmatter.author,
305+
description:
306+
node.frontmatter.description || node.frontmatter.subtitle,
307+
date: node.frontmatter.date,
308+
url: site.siteMetadata.siteUrl + node.fields.slug,
309+
guid: site.siteMetadata.siteUrl + node.fields.slug,
310+
enclosure: node.frontmatter.thumbnail && {
311+
url:
312+
site.siteMetadata.siteUrl +
313+
node.frontmatter.thumbnail.publicURL,
314+
},
315+
custom_elements: [
316+
{ "content:encoded": node.html },
317+
{ "content:type": node.frontmatter.type },
318+
{ "content:category": node.frontmatter.category },
319+
{ "content:tags": node.frontmatter.tags?.join(", ") || "" },
320+
],
321+
});
322+
});
323+
},
324+
query: `{
325+
allPosts: allMdx(
326+
sort: {frontmatter: {date: DESC}}
327+
filter: {
328+
fields: {collection: {in: ["blog", "resources", "news", "events"]}},
329+
frontmatter: {
330+
published: { eq: true }
331+
category: { in: ["Meshery", "Announcements", "Events"] }
332+
tags: { in: ["Community", "Meshery", "mesheryctl"] }
333+
}
334+
}
335+
limit: 30
336+
) {
337+
nodes {
338+
body
339+
html
340+
frontmatter {
341+
title
342+
author
343+
description
344+
subtitle
345+
date(formatString: "MMM DD YYYY")
346+
type
347+
category
348+
thumbnail {
349+
publicURL
350+
}
351+
tags
352+
}
353+
fields {
354+
collection
355+
slug
356+
}
357+
}
358+
}
359+
}`,
360+
output: "/meshery-community-feed.xml",
361+
title: "Meshery RSSFeed",
362+
},
363+
{
364+
serialize: ({ query: { site, allPosts } }) => {
365+
return allPosts.nodes.map((node) => {
291366
return Object.assign({}, node.frontmatter, {
292367
title: node.frontmatter.title,
293368
author: node.frontmatter.author,
@@ -296,7 +371,9 @@ module.exports = {
296371
url: site.siteMetadata.siteUrl + node.fields.slug,
297372
guid: site.siteMetadata.siteUrl + node.fields.slug,
298373
enclosure: node.frontmatter.thumbnail && {
299-
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
374+
url:
375+
site.siteMetadata.siteUrl +
376+
node.frontmatter.thumbnail.publicURL,
300377
},
301378
custom_elements: [{ "content:encoded": node.html }],
302379
});
@@ -328,11 +405,11 @@ module.exports = {
328405
}
329406
}`,
330407
output: "/blog/feed.xml",
331-
title: "Layer5 Blog"
408+
title: "Layer5 Blog",
332409
},
333410
{
334411
serialize: ({ query: { site, allPosts } }) => {
335-
return allPosts.nodes.map(node => {
412+
return allPosts.nodes.map((node) => {
336413
return Object.assign({}, node.frontmatter, {
337414
title: node.frontmatter.title,
338415
author: node.frontmatter.author,
@@ -341,7 +418,9 @@ module.exports = {
341418
url: site.siteMetadata.siteUrl + node.fields.slug,
342419
guid: site.siteMetadata.siteUrl + node.fields.slug,
343420
enclosure: node.frontmatter.thumbnail && {
344-
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
421+
url:
422+
site.siteMetadata.siteUrl +
423+
node.frontmatter.thumbnail.publicURL,
345424
},
346425
custom_elements: [{ "content:encoded": node.html }],
347426
});
@@ -373,7 +452,7 @@ module.exports = {
373452
}
374453
}`,
375454
output: "/events/feed.xml",
376-
title: "Layer5 Events"
455+
title: "Layer5 Events",
377456
},
378457
],
379458
},
@@ -455,8 +534,8 @@ module.exports = {
455534
{
456535
resolve: "gatsby-source-filesystem",
457536
options: {
458-
path: `${__dirname}/src/collections/service-mesh-workshops`,
459-
name: "service-mesh-workshops",
537+
path: `${__dirname}/src/collections/workshops`,
538+
name: "workshops",
460539
},
461540
},
462541
{
@@ -514,8 +593,8 @@ module.exports = {
514593
options: {
515594
defaults: {
516595
placeholder: "blurred",
517-
}
518-
}
596+
},
597+
},
519598
},
520599
{
521600
resolve: "gatsby-transformer-sharp",
@@ -547,10 +626,9 @@ module.exports = {
547626
host: "https://layer5.io",
548627
sitemap: "https://layer5.io/sitemap-index.xml",
549628
policy: [{ userAgent: "*", allow: "/" }],
550-
}
629+
},
551630
},
552631
"gatsby-plugin-meta-redirect",
553632
// make sure this is always the last one
554633
],
555-
556634
};

gatsby-node.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
7373
isPermanent: true,
7474
});
7575
createRedirect({
76-
fromPath: "/learn/workshops",
77-
toPath: "/learn/service-mesh-workshops",
76+
fromPath: "/learn/service-mesh-workshops",
77+
toPath: "/learn/workshops",
7878
redirectInBrowser: true,
7979
isPermanent: true,
8080
});
@@ -517,7 +517,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
517517
}
518518
}
519519
singleWorkshop: allMdx(
520-
filter: { fields: { collection: { eq: "service-mesh-workshops" } } }
520+
filter: { fields: { collection: { eq: "workshops" } } }
521521
) {
522522
nodes {
523523
fields {
@@ -929,7 +929,7 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
929929
slug = `/company/${collection}/${slugify(node.frontmatter.title)}`;
930930
break;
931931
case "service-mesh-books":
932-
case "service-mesh-workshops":
932+
case "workshops":
933933
case "service-mesh-labs":
934934
slug = `/learn/${collection}/${slugify(node.frontmatter.title)}`;
935935
break;

0 commit comments

Comments
 (0)