Skip to content

Commit bdf4279

Browse files
Merge branch 'master' into update-contributing-docs
2 parents b6a7748 + e2b5dda commit bdf4279

740 files changed

Lines changed: 87 additions & 4488 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.

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
GATSBY_GRAPHQL_IDE=playground
1+
# GATSBY_GRAPHQL_IDE=playground

content-learn/mastering-meshery/introduction-to-meshery/index.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ courseTitle: "Introduction to Meshery"
88
themeColor: "#00B39F"
99
order: 1
1010
cardImage: '../../../src/assets/images/meshery/icon-only/meshery-logo-white.svg'
11+
meshesYouLearn:
12+
[
13+
{
14+
imagepath: "../../../src/assets/images/meshery/icon-only/meshery-logo.svg",
15+
name: "Meshery",
16+
},
17+
]
1118
toc:
1219
[
1320
"meshery-concepts",

gatsby-config.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
/* eslint-env node */
22

3+
const isDevelopment = process.env.NODE_ENV === "development";
34
const isProduction = process.env.NODE_ENV === "production";
45
const isFullSiteBuild = process.env.BUILD_FULL_SITE === "true";
56
const HEAVY_COLLECTIONS = ["members", "integrations"];
67
const collectionIgnoreGlobs = isFullSiteBuild
78
? []
89
: HEAVY_COLLECTIONS.map((name) => `**/${name}/**`);
9-
// const isDevelopment = process.env.NODE_ENV === "development";
10-
10+
const devFlags = isDevelopment
11+
? {
12+
PARALLEL_SOURCING: false,
13+
PRESERVE_FILE_DOWNLOAD_CACHE: true,
14+
}
15+
: {};
16+
console.info(`Build Environment: "${process.env.NODE_ENV}"`);
17+
collectionIgnoreGlobs == [] ?
18+
console.info(`Build Scope exludes: "${process.env.BUILD_FULL_SITE}"`)
19+
:
20+
console.info("Build Scope includes all collections");
1121
module.exports = {
1222
siteMetadata: {
1323
title: "Layer5 - Expect more from your infrastructure",
@@ -20,9 +30,9 @@ module.exports = {
2030
twitterUsername: "@layer5",
2131
},
2232
flags: {
23-
FAST_DEV: true,
24-
PARALLEL_SOURCING: false, // Disable parallel sourcing to reduce memory pressure
33+
FAST_DEV: false,
2534
DEV_SSR: false,
35+
...devFlags,
2636
},
2737
trailingSlash: "never",
2838
plugins: [
@@ -518,4 +528,4 @@ module.exports = {
518528
"gatsby-plugin-meta-redirect",
519529
// make sure this is always the last one
520530
],
521-
};
531+
};

gatsby-node.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const slugify = require("./src/utils/slugify");
1111
const { paginate } = require("gatsby-awesome-pagination");
1212
const { createFilePath } = require("gatsby-source-filesystem");
1313
const config = require("./gatsby-config");
14+
const isDevelopment = process.env.NODE_ENV === "development";
15+
const isProduction = process.env.NODE_ENV === "production";
1416
const {
1517
componentsData,
1618
} = require("./src/sections/Projects/Sistent/components/content");
@@ -92,6 +94,12 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
9294

9395
const envCreatePage = (props) => {
9496
const pageConfig = { ...props };
97+
98+
if (isDevelopment) {
99+
pageConfig.defer = true;
100+
} else if (isProduction) {
101+
pageConfig.mode = "SSR";
102+
}
95103
pageConfig.slices = { ...DEFAULT_SLICES, ...(pageConfig.slices || {}) };
96104

97105
if (process.env.CI === "true") {

onRenderBody.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,31 @@ const themes = { light: lighttheme, dark: darktheme };
77
const MagicScriptTag = (props) => {
88
const codeToRunOnClient = `
99
(function() {
10+
// 1. Keeps SYSTEM as the priority preference
1011
const themeFromLocalStorage = localStorage.getItem('${DarkThemeKey}') || '${ThemeSetting.SYSTEM}';
11-
const systemDarkModeSetting = () => window.matchMedia ? window.matchMedia('(prefers-color-scheme: dark)') : null;
12-
const isDarkModeActive = () => {
13-
return !!systemDarkModeSetting()?.matches;
12+
13+
// 2. We change the check to look for LIGHT mode explicitly
14+
const systemLightModeSetting = () => window.matchMedia ? window.matchMedia('(prefers-color-scheme: light)') : null;
15+
16+
const isLightModeActive = () => {
17+
return !!systemLightModeSetting()?.matches;
1418
};
19+
1520
let colorMode;
1621
switch (themeFromLocalStorage) {
1722
case '${ThemeSetting.SYSTEM}':
18-
colorMode = isDarkModeActive() ? '${ThemeSetting.DARK}' : '{ThemeSetting.LIGHT}'
23+
// LOGIC CHANGE: If Light is active -> Light. Otherwise (Dark, No Preference, or Error) -> Dark.
24+
colorMode = isLightModeActive() ? '${ThemeSetting.LIGHT}' : '${ThemeSetting.DARK}'
1925
break
2026
case '${ThemeSetting.DARK}':
2127
case '${ThemeSetting.LIGHT}':
2228
colorMode = themeFromLocalStorage
2329
break
2430
default:
25-
colorMode = '${ThemeSetting.LIGHT}'
31+
// 3. Fallback to DARK in case of error
32+
colorMode = '${ThemeSetting.DARK}'
2633
}
34+
2735
const root = document.documentElement;
2836
const iterate = (obj) => {
2937
if (!obj) return;
@@ -46,4 +54,4 @@ const MagicScriptTag = (props) => {
4654

4755
export const onRenderBody = ( { setPreBodyComponents }) => {
4856
setPreBodyComponents(<MagicScriptTag key="theme-injection" theme={themes} />);
49-
};
57+
};

src/collections/blog/2022/2022-01-07-Recap-KubeCon-China-TAG-Network-talk/index.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import Smp from "./smp-meshery.webp";
2323
import Smi from "./smi-meshery.webp";
2424
import Patterns from "./patterns.webp";
2525
import Catalog from "./catalog.webp";
26-
import slidesTAG from "../../../events/2021/kubecon-china-2021/cncf-tag-network-and-service-mesh-working-group-kubecon-china-2021-lee-calcote-ken-owens.pdf";
2726
import { Link } from "gatsby";
2827

2928
<BlogWrapper>
@@ -94,7 +93,7 @@ The majority of the more detailed activities occur in the CNCF Service Mesh Work
9493
alt="GetNighthawk"
9594
/>
9695

97-
<strong>Calcote and Owens packed a great deal of information in this talk. If you are passionate about Cloud Native Networking and Service Meshes, then this talk is definitely worth your time. Find the recording below. The presentation slides are available <a href={slidesTAG}>here</a>. </strong>
96+
<strong>Calcote and Owens packed a great deal of information in this talk. If you are passionate about Cloud Native Networking and Service Meshes, then this talk is definitely worth your time. Find the recording below. The <a href="/static/events/2021/kubecon-china-2021/cncf-tag-network-and-service-mesh-working-group-kubecon-china-2021-lee-calcote-ken-owens.pdf">presentation slides</a> are available.</strong>
9897
<div className="iframe-container">
9998
<iframe src="https://www.youtube.com/embed/pUDm8Xx4RXg" loading="lazy" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen ></iframe>
10099
</div>

src/collections/blog/2022/2022-05-10-dockercon-22-hashicorp-talk/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ featured: true
1919

2020
import { BlogWrapper } from "../../Blog.style.js";
2121
import Blockquote from "../../../../reusecore/Blockquote";
22-
import slidesTAG from "../../../events/2021/kubecon-china-2021/cncf-tag-network-and-service-mesh-working-group-kubecon-china-2021-lee-calcote-ken-owens.pdf";
2322
import { Link } from "gatsby";
2423
import DDE from './docker-extension-meshery.webp';
2524
import developer from './developers-need.webp';

src/collections/blog/2022/2022-05-14-service-meshcon-talk-intel/index.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ import { BlogWrapper } from "../../Blog.style.js";
2222
import Blockquote from "../../../../reusecore/Blockquote";
2323
import { Link } from "gatsby";
2424

25-
import slidesTAG from "../../../events/2021/kubecon-china-2021/cncf-tag-network-and-service-mesh-working-group-kubecon-china-2021-lee-calcote-ken-owens.pdf";
26-
2725
import meshmark from './meshmark-dark-text-side.svg';
2826
import performanceQuestion from './performance-question.webp';
2927
import smp from './smp.webp';
-3.04 MB
Loading

src/collections/blog/2024/11-05-what-is-the-kanvas-catalog/post.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import designPannelOpener from "./designs-panel-opener.png";
2727
import designerDockPNG from "./designer-dock.png";
2828
import catalogGIF from "../../../../assets/images/kanvas/gifs/catalog.gif";
2929
import publishToCatalogGIF from "./publish-to-catalog.gif";
30-
import importGIF from "./import-design-gif.gif";
3130
import getStartedWithDesignerGIF from "../../../../assets/images/kanvas/gifs/start-from-scratch.gif";
3231

3332
<BlogWrapper>
@@ -73,7 +72,7 @@ Begin by creating a new design from scratch, using existing design patterns and
7372

7473

7574
- Access the Kanvas Designer and select the "Import" button in the left Designs panel. Import your own designs from local filesystem or from a remote URL directly into the Catalog. Upload a file or provide a URL for Docker Compose, Helm Charts, Meshery Designs or Kubernetes Manifests. Choose to either import as new or merge into current design that you have open in Kanvas.
76-
<img src={importGIF} />
75+
<img src="/blog/2024/11-05-what-is-the-kanvas-catalog/import-design-gif.gif" />
7776

7877
Kanvas will convert these into a usable design based on their configurations.
7978

0 commit comments

Comments
 (0)