Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDX] Migration to gatsby-plugin-mdx v4 with fix for onCreatePage trigger issue #4585

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
dd98947
Revert "Merge pull request #4580 from thisiskaransgit/revert-4532-mdx…
randychilau Jul 20, 2023
322606a
fix: .html check for already updated urls
randychilau Jul 20, 2023
d8e08ae
feat: remind on page creation/url/redirect changes
randychilau Jul 20, 2023
9ba13f8
Merge 'master' into mdx2-upgrade-v3
randychilau Jul 20, 2023
b8ec8f5
Merge branch 'master' into mdx2-upgrade-v3
randychilau Jul 21, 2023
cb31caa
fix: resize/optimize images with tiny-img
randychilau Jul 21, 2023
e4c1b8f
fix: remove InlineQuote from shortcodes
randychilau Jul 21, 2023
a6872c5
Merge branch 'master' into mdx2-upgrade-v3
randychilau Jul 22, 2023
d92ab45
fix: remove hashtag char from url
randychilau Jul 22, 2023
ae738b9
test : added new line
randychilau Sep 1, 2023
22bc224
fix: review mdx for large img, shortcodes, syntax
randychilau Sep 1, 2023
d0132c9
merge: review merge changes for mdx issues
randychilau Sep 1, 2023
e0cca5e
fix: react style formatting for mdx
randychilau Sep 1, 2023
aa9d061
test: gatsbyImageData layout and HEAD data import
randychilau Sep 2, 2023
cad3a70
Merge branch 'master' into mdx2-upgrade-v3
randychilau Sep 2, 2023
439d1d3
test: GATSBY_DEV_AMENDED=true
randychilau Sep 2, 2023
39d8eae
test: update config for mdx events
randychilau Sep 2, 2023
5d77acb
test: lhci build testing
randychilau Sep 2, 2023
5d26a25
fix: Head component destructure imported data
randychilau Sep 2, 2023
a80777e
test: only restrict members for memory heap issues
randychilau Sep 2, 2023
b6982ee
test: remove GATSBY_DEV_AMENDED
randychilau Sep 2, 2023
78c9aa0
fix: optimize member images 500 width / webp
randychilau Sep 3, 2023
5342cb7
fix: remove unused data query n import correction
randychilau Sep 3, 2023
8510727
fix: remove unused query from navigation
randychilau Sep 3, 2023
f10dbfb
fix: optimize integration meshmap images
randychilau Sep 3, 2023
e4e292a
fix: remove bubblesElement from footer
randychilau Sep 3, 2023
2a3f4c3
fix: optimize image size for members letter d
randychilau Sep 3, 2023
7bb7301
test: 80 members mdx pages
randychilau Sep 3, 2023
5dc21a1
test: update member pages to 100
randychilau Sep 3, 2023
2a9e0c2
test: fix member cyrine gamoudi
randychilau Sep 3, 2023
163163a
test: change member folders to 150
randychilau Sep 3, 2023
8059e90
fix: correct image_path for colby stoker
randychilau Sep 3, 2023
169bd7c
test: moving mdxprovider to layout
randychilau Sep 3, 2023
19c6837
test: add null-checking to member-single
randychilau Sep 3, 2023
a7f8dc4
test: move cyrine-gamoudi folder
randychilau Sep 3, 2023
ab93077
test: turn off GATSBY_DEV_AMENDED
randychilau Sep 3, 2023
8994b78
fix: only load templates
randychilau Sep 4, 2023
0b6418b
fix: break up graphql queries
randychilau Sep 4, 2023
a678276
fix: optimize img size and compression E-K members
randychilau Sep 4, 2023
45953e3
test: reduce integration page size
randychilau Sep 4, 2023
8653746
test: integration file size reduction
randychilau Sep 5, 2023
bdb625f
test: remove GoogleTag to reduce file size
randychilau Sep 5, 2023
603145b
test: limit number of members
randychilau Sep 5, 2023
3a42659
test: change # of member mdx files to 125
randychilau Sep 5, 2023
102ad8a
test: fix member page issue
randychilau Sep 5, 2023
4efe8b4
test: fix frontmatter spacing
randychilau Sep 5, 2023
e481070
test: expand member mdx pages to 175
randychilau Sep 5, 2023
7eddcd5
test: member mdx pages to 150
randychilau Sep 5, 2023
eaf0b61
test: limit member mdx pages to first 165
randychilau Sep 5, 2023
f8e75dd
fix: revert changes to reduce file size
randychilau Sep 5, 2023
57de9b8
fix: update member mdx query and page creation
randychilau Sep 5, 2023
021c435
Merge branch 'master' into mdx2-upgrade-v3
randychilau Sep 5, 2023
7c89b22
fix: correct frontmatter image link
randychilau Sep 5, 2023
1e10f7a
test: add image to blog post folder
randychilau Sep 5, 2023
efc5a32
fix: update to react style format
randychilau Sep 5, 2023
d4861ea
test: remove mdx page restriction
randychilau Sep 5, 2023
e3c7b1f
revert: re-add google tag scripts to pages
randychilau Sep 5, 2023
3db1070
revert: re-add MDXComponents to ssr
randychilau Sep 5, 2023
d64cd34
fix: update to only include .mdx files
randychilau Sep 5, 2023
6245012
Merge branch 'master' into mdx2-upgrade-v3
randychilau Sep 11, 2023
228a0e4
Merge branch 'master' into mdx2-upgrade-v3
randychilau Sep 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
GATSBY_GRAPHQL_IDE=playground
GATSBY_DEV_AMENDED=false
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GATSBY_DEV_AMENDED=false
25 changes: 24 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,28 @@ module.exports = {
"space-infix-ops": [
"error"
]
}
},
"overrides": [
{
"files": ["*.mdx", "*.md"],
"extends": ["plugin:mdx/recommended"],
"settings": {
"mdx/code-blocks": true,
"mdx/language-mapper": {},
},
"rules": {
//these eslint rule exceptions allow for checklint to run and lint mdx files are compatible with MDXv2, and not error out due to react/eslint rules
"semi": 0,
"indent": 0,
"no-trailing-spaces": 0,
"object-curly-spacing": 0,
"space-infix-ops": 0,
"no-irregular-whitespace": 0,
"no-unused-expressions": 0,
"linebreak-style": 0,
"react/jsx-no-undef": 0,
"no-unused-vars": 0,
}
}
],
};
13 changes: 10 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
---
name: 🐛 Bug Report
about: Report an issue to help us improve
title: ''
labels: 'kind/bug'
assignees: ''
title: ""
labels: "kind/bug"
assignees: ""
---

### Description

<!-- A brief description with a link to the page on the site where you found the issue. -->

### Expected Behavior

<!-- A brief description of what you expected to happen. -->

### Screenshots

<!-- Add screenshots, if applicable, to help explain your problem. -->

### Environment:

- Host OS:
- Browser:

---

<img src="https://raw.githubusercontent.com/layer5io/layer5/master/.github/assets/images/layer5/5-light-small.svg" width="24px" align="left" /><h2>Contributor Resources and <a href="https://layer5.io/community/handbook">Handbook</a></h2>

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the [`master` branch](https://github.com/layer5io/layer5/tree/master).

- 📚 See [contributing instructions](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md).
- 🎨 Wireframes and [designs for Layer5 site](https://www.figma.com/file/5ZwEkSJwUPitURD59YHMEN/Layer5-Designs) in Figma [(open invite)](https://www.figma.com/team_invite/redeem/qJy1c95qirjgWQODApilR9)
- 🙋🏾🙋🏼 Questions: [Discussion Forum](https://discuss.layer5.io) and [Community Slack](https://slack.layer5.io).
Expand Down
11 changes: 8 additions & 3 deletions .github/ISSUE_TEMPLATE/chore_task.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
---
name: 🧹Chore or task
about: Identify a necessary task to be addressed.
title: ''
labels: 'kind/chore'
assignees: ''
title: ""
labels: "kind/chore"
assignees: ""
---

### Current Behavior

<!-- A brief description of what the current circumstance is. -->

### Desired Situation

<!-- A brief description of the necessary action to take. -->

---

<img src="https://raw.githubusercontent.com/layer5io/layer5/master/.github/assets/images/layer5/5-light-small.svg" width="24px" align="left" /><h2>Contributor Resources and <a href="https://layer5.io/community/handbook">Handbook</a></h2>

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the [`master` branch](https://github.com/layer5io/layer5/tree/master).

- 📚 See [contributing instructions](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md).
- 🎨 Wireframes and [designs for Layer5 site](https://www.figma.com/file/5ZwEkSJwUPitURD59YHMEN/Layer5-Designs) in Figma [(open invite)](https://www.figma.com/team_invite/redeem/qJy1c95qirjgWQODApilR9)

Expand Down
244 changes: 228 additions & 16 deletions CONTRIBUTING.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ videos: 3
lectures: 8
cardImage: "../../../src/assets/images/service-mesh-icons/istio-white.svg"
meshesYouLearn:
[
{
imagepath: "../../../src/assets/images/service-mesh-icons/istio.svg",
name: "Istio",
},
{
imagepath: "../../../src/assets/images/service-mesh-icons/linkerd.webp",
name: "Linkerd",
}
]
- imagepath: "../../../src/assets/images/service-mesh-icons/istio.svg"
name: "Istio"
- imagepath: "../../../src/assets/images/service-mesh-icons/linkerd.webp"
name: "Linkerd"
toc:
[
'getting-started',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lectures: 12
order: 8
---

import { ChapterStyle } from "../../../../src/components/Learn-Components/Chapters-Style/chapters.style.js";


<ChapterStyle>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lectures: 12
order: 2
---

import { ChapterStyle } from "../../../../src/components/Learn-Components/Chapters-Style/chapters.style.js";

import BookInfoOffMesh from "../../../../src/assets/images/learn-layer5/istio/bookinfo-off-mesh.webp";
import BookInfoOnMesh from "../../../../src/assets/images/learn-layer5/istio/bookinfo-on-mesh.webp";

Expand Down Expand Up @@ -61,7 +61,7 @@ If your environment **does NOT** supports either of these two APIs, then you may
As part of Istio deployment in [Previous chapter](./getting-started), you have deployed the sidecar injector.

<br />
<h2 class="chapter-sub-heading">
<h2 className="chapter-sub-heading">
<a name="auto"></a> Deploying Sample App with Automatic sidecar injection
</h2>

Expand Down Expand Up @@ -107,7 +107,7 @@ This will do 3 things:
1. Deploys all the BookInfo services in the `default` namespace.
1. Deploys the virtual service and gateway needed to expose the BookInfo's productpage application in the `default` namespace.

<h3 class="chapter-sub-heading">
<h3 className="chapter-sub-heading">
<a name="verify"></a> Verify Bookinfo deployment{" "}
</h3>

Expand Down Expand Up @@ -139,7 +139,7 @@ Follow this if the above steps did not work for you
<br />
<br />

<h4 class="chapter-alt-heading"> Label namespace for injection</h4>
<h4 className="chapter-alt-heading"> Label namespace for injection</h4>

Label the default namespace with istio-injection=enabled

Expand All @@ -161,7 +161,7 @@ kube-public Active 1h
kube-system Active 1h
```

<h4 class="chapter-alt-heading"> Deploy BookInfo</h4>
<h4 className="chapter-alt-heading"> Deploy BookInfo</h4>
<br />

Applying this yaml file included in the Istio package you collected in [Getting Started](./getting-started) will deploy the BookInfo app in you cluster.
Expand All @@ -170,7 +170,7 @@ Applying this yaml file included in the Istio package you collected in [Getting
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
```

<h4 class="chapter-alt-heading">
<h4 className="chapter-alt-heading">
Deploy Gateway and Virtual Service for BookInfo app
</h4>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ lectures: 12
order: 3
---

import { ChapterStyle } from "../../../../src/components/Learn-Components/Chapters-Style/chapters.style.js";


<ChapterStyle>
The components deployed on the service mesh by default are not exposed outside the cluster. An Ingress Gateway is deployed as a Kubernetes service of type LoadBalancer (or NodePort). To make Bookinfo accessible external to the cluster, you have to create an `Istio Gateway` for the Bookinfo application and also define an `Istio VirtualService` with the routes we need.

<br />
<br />

<h2 class="chapter-sub-heading"> Inspecting the Istio Ingress Gateway</h2>
<h2 className="chapter-sub-heading"> Inspecting the Istio Ingress Gateway</h2>

<br />
The ingress gateway gets exposed as a normal Kubernetes service of type LoadBalancer
Expand Down Expand Up @@ -63,10 +63,10 @@ Now let us find the ingress pod and output the log:
kubectl logs istio-ingressgateway-... -n istio-system
```

<h2 class="chapter-sub-heading">View Istio Ingress Gateway for Bookinfo</h2>
<h2 className="chapter-sub-heading">View Istio Ingress Gateway for Bookinfo</h2>
<br />

<h3 class="chapter-sub-heading"> View the Gateway and VirtualServices</h3>
<h3 className="chapter-sub-heading"> View the Gateway and VirtualServices</h3>

Check the created `Istio Gateway` and `Istio VirtualService` to see the changes deployed:

Expand All @@ -78,7 +78,7 @@ kubectl get virtualservices
kubectl get virtualservices -o yaml
```

<h3 class="chapter-sub-heading">
<h3 className="chapter-sub-heading">
Find the external port of the Istio Ingress Gateway by running:
</h3>

Expand All @@ -92,7 +92,7 @@ To just get the first port of istio-ingressgateway service, we can run this:
kubectl get service istio-ingressgateway -n istio-system --template='{{(index .spec.ports 1).nodePort}}'
```

<h3 class="chapter-sub-heading"> Create a DNS entry:</h3>
<h3 className="chapter-sub-heading"> Create a DNS entry:</h3>

Modify your local `/etc/hosts` file to add an entry for your sample application.

Expand All @@ -108,7 +108,7 @@ echo "http://$(kubectl get nodes --selector=kubernetes.io/role!=master -o jsonpa

Docker Desktop users please use `http://localhost/productpage` to access product page in your browser.

<h2 class="chapter-sub-heading"> Apply default destination rules</h2>
<h2 className="chapter-sub-heading"> Apply default destination rules</h2>

Before we start playing with Istio's traffic management capabilities we need to define the available versions of the deployed services. They are called subsets, in destination rules.

Expand Down Expand Up @@ -189,16 +189,16 @@ kubectl get destinationrules
kubectl get destinationrules -o yaml
```

<h2 class="chapter-sub-heading"> Browse to BookInfo</h2>
<h2 className="chapter-sub-heading"> Browse to BookInfo</h2>

Browse to the website of the Bookinfo. To view the product page, you will have to append
`/productpage` to the url.

<h3 class="chapter-sub-heading"> Reload Page</h3>
<h3 className="chapter-sub-heading"> Reload Page</h3>

Now, reload the page multiple times and notice how it round robins between v1, v2 and v3 of the reviews service.

<h2 class="chapter-sub-heading">
<h2 className="chapter-sub-heading">
Inspect the Istio proxy of the productpage pod
</h2>

Expand Down Expand Up @@ -232,15 +232,15 @@ Follow this if the above steps did not work for you
<br />
<br />

<h4 class="chapter-alt-heading"> Default destination rules</h4>
<h4 className="chapter-alt-heading"> Default destination rules</h4>

Run the following command to create default destination rules for the Bookinfo services:

```sh
kubectl apply -f samples/bookinfo/networking/destination-rule-all-mtls.yaml
```

<h4 class="chapter-alt-heading">
<h4 className="chapter-alt-heading">
Configure the Bookinfo route with the Istio Ingress gateway
</h4>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ lectures: 12
order: 1
---

import { ChapterStyle } from "../../../../src/components/Learn-Components/Chapters-Style/chapters.style.js";

import InstallIstio from "../../../../src/assets/images/learn-layer5/istio/install-istio.webp";
import IstioAdapter from "../../../../src/assets/images/learn-layer5/istio/istio-adapter.webp";

<ChapterStyle>

<h2 class="chapter-sub-heading">Setup Istio </h2>
<h2 className="chapter-sub-heading">Setup Istio </h2>

Now that we have a Kubernetes cluster and Meshery, we are ready to download and deploy Istio resources.

<h2 class="chapter-sub-heading">Steps</h2>
<h2 className="chapter-sub-heading">Steps</h2>

1. [Install Istio](#1)
1. [Verify install](#2)
Expand All @@ -28,7 +28,7 @@ Optional (manual install of Istio):
1. [Setup `istioctl`](#1.2)
1. [Install istio](#1.3)

<h3 class="chapter-sub-heading">
<h3 className="chapter-sub-heading">
<a name="1">Install Istio</a>
</h3>

Expand All @@ -53,7 +53,7 @@ Perform the below steps if the above steps doesn't work for you.
<br />
<br />

<h4 class="chapter-alt-heading">
<h4 className="chapter-alt-heading">
<a name="1.1">Download Istio</a>
</h4>

Expand All @@ -67,7 +67,7 @@ On your local machine, execute:
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.7.3 sh -
```

<h4 class="chapter-alt-heading">
<h4 className="chapter-alt-heading">
<a name="1.2">Setting up istioctl</a>
</h4>

Expand Down Expand Up @@ -96,7 +96,7 @@ Check if the cluster is ready for installation:
istioctl verify-install
```

<h4 class="chapter-alt-heading">
<h4 className="chapter-alt-heading">
<a name="1.3">Install Istio</a>
</h4>

Expand All @@ -112,7 +112,7 @@ Alternatively, with Envoy logging enabled:
istioctl install --set profile=demo --set meshConfig.accessLogFile=/dev/stdout
```

<h3 class="chapter-sub-heading">
<h3 className="chapter-sub-heading">
<a name="2">Verify install</a>
</h3>

Expand All @@ -121,7 +121,7 @@ In the Istio management page:
1. Click the (+) icon on the `Validate Service Mesh Configuration` card.
1. Select `Verify Installation` to verify the installation of Istio.

<h4 class="chapter-alt-heading">Alternatively:</h4>
<h4 className="chapter-alt-heading">Alternatively:</h4>

Istio is deployed in a separate Kubernetes namespace `istio-system`. To check if Istio is deployed, and also, to see all the pieces that are deployed, execute the following:

Expand Down
Loading
Loading