Skip to content

Commit e712a95

Browse files
committed
markdown compatibility
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
1 parent cd389a3 commit e712a95

509 files changed

Lines changed: 1528 additions & 5277 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.

content-learn/mastering-kubernetes-for-engineers/index.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@ courses: 1
88
disabled: no
99
---
1010

11-
<!--
12-
This file is only used to render the courses list within a learning path.
13-
Check the Learn-Layer5 folder under src/sections/, src/templates for more understanding of how the data is used
14-
-->
11+
{/* This file is only used to render the courses list within a learning path.
12+
Check the Learn-Layer5 folder under src/sections/, src/templates for more understanding of how the data is used */}

content-learn/mastering-meshery/index.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@ technologyList: ["all"]
1010
prominentStyling: true
1111
---
1212

13-
<!--
14-
This file is only used to render the courses list within a learning path.
15-
Check the Learn-Layer5 folder under src/sections/, src/templates for more understanding of how the data is used
16-
-->
13+
{/* This file is only used to render the courses list within a learning path.
14+
Check the Learn-Layer5 folder under src/sections/, src/templates for more understanding of how the data is used */}

content-learn/mastering-service-meshes-for-developers/index.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@ cardImage: '../../src/assets/images/service-mesh-icons/service-mesh.svg'
77
courses: 4
88
---
99

10-
<!--
11-
This file is only used to render the courses list within a learning path.
12-
Check the Learn-Layer5 folder under src/sections/, src/templates for more understanding of how the data is used
13-
-->
10+
{/* This file is only used to render the courses list within a learning path.
11+
Check the Learn-Layer5 folder under src/sections/, src/templates for more understanding of how the data is used */}

fix_mdx_p_tags.py

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/env python3
2+
import os
3+
import re
4+
from pathlib import Path
5+
6+
def fix_p_tags_in_file(filepath):
7+
"""Remove <p> and </p> tags from MDX files."""
8+
with open(filepath, 'r', encoding='utf-8') as f:
9+
content = f.read()
10+
11+
original_content = content
12+
13+
# Remove <p> tags at the start of lines (with optional whitespace)
14+
content = re.sub(r'^(\s*)<p>\s*\n', r'\1', content, flags=re.MULTILINE)
15+
16+
# Remove </p> tags at the end of lines (with optional whitespace)
17+
content = re.sub(r'\s*</p>\s*$', '', content, flags=re.MULTILINE)
18+
19+
# Remove inline <p> and </p> tags
20+
content = re.sub(r'<p>([^<\n]+)</p>', r'\1', content)
21+
22+
# Remove remaining standalone <p> and </p> tags
23+
content = re.sub(r'<p>', '', content)
24+
content = re.sub(r'</p>', '', content)
25+
26+
if content != original_content:
27+
with open(filepath, 'w', encoding='utf-8') as f:
28+
f.write(content)
29+
return True
30+
return False
31+
32+
def fix_html_comments(filepath):
33+
"""Convert HTML comments to MDX comments."""
34+
with open(filepath, 'r', encoding='utf-8') as f:
35+
content = f.read()
36+
37+
original_content = content
38+
39+
# Convert HTML comments to MDX comments
40+
content = re.sub(r'<!--\s*(.*?)\s*-->', r'{/* \1 */}', content, flags=re.DOTALL)
41+
42+
if content != original_content:
43+
with open(filepath, 'w', encoding='utf-8') as f:
44+
f.write(content)
45+
return True
46+
return False
47+
48+
# Fix integrations
49+
integrations_dir = Path('/Users/l/code/layer5/src/collections/integrations')
50+
for mdx_file in integrations_dir.rglob('*.mdx'):
51+
if fix_p_tags_in_file(mdx_file):
52+
print(f"Fixed: {mdx_file}")
53+
54+
# Fix events
55+
events_dir = Path('/Users/l/code/layer5/src/collections/events')
56+
for mdx_file in events_dir.rglob('*.mdx'):
57+
if fix_p_tags_in_file(mdx_file):
58+
print(f"Fixed: {mdx_file}")
59+
60+
# Fix learning paths (HTML comments)
61+
learn_dirs = [
62+
'/Users/l/code/layer5/content-learn/mastering-service-meshes-for-developers/index.mdx',
63+
'/Users/l/code/layer5/content-learn/mastering-meshery/index.mdx',
64+
'/Users/l/code/layer5/content-learn/mastering-kubernetes-for-engineers/index.mdx'
65+
]
66+
for filepath in learn_dirs:
67+
if os.path.exists(filepath):
68+
if fix_html_comments(filepath):
69+
print(f"Fixed HTML comments: {filepath}")
70+
71+
print("Done!")

fix_remaining_mdx.py

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#!/usr/bin/env python3
2+
import os
3+
import re
4+
from pathlib import Path
5+
6+
def fix_p_tags_in_file(filepath):
7+
"""Remove <p> and </p> tags from MDX files."""
8+
with open(filepath, 'r', encoding='utf-8') as f:
9+
content = f.read()
10+
11+
original_content = content
12+
13+
# Remove <p> tags at the start of lines (with optional whitespace)
14+
content = re.sub(r'^(\s*)<p>\s*\n', r'\1', content, flags=re.MULTILINE)
15+
16+
# Remove </p> tags at the end of lines (with optional whitespace)
17+
content = re.sub(r'\s*</p>\s*$', '', content, flags=re.MULTILINE)
18+
19+
# Remove inline <p> and </p> tags
20+
content = re.sub(r'<p>([^<\n]+)</p>', r'\1', content)
21+
22+
# Remove remaining standalone <p> and </p> tags
23+
content = re.sub(r'<p>', '', content)
24+
content = re.sub(r'</p>', '', content)
25+
26+
if content != original_content:
27+
with open(filepath, 'w', encoding='utf-8') as f:
28+
f.write(content)
29+
return True
30+
return False
31+
32+
def fix_unclosed_tags(filepath):
33+
"""Fix common unclosed tag patterns."""
34+
with open(filepath, 'r', encoding='utf-8') as f:
35+
content = f.read()
36+
37+
original_content = content
38+
39+
# Fix split <a> tags (join them to single line)
40+
content = re.sub(r'<a\s+([^>]+)\s*>\s*\n\s*([^<]+)\s*\n\s*</a>', r'<a \1>\2</a>', content, flags=re.MULTILINE)
41+
42+
# Fix split <Link> tags
43+
content = re.sub(r'<Link\s+([^>]+)\s*>\s*\n\s*([^<]+)\s*\n\s*</Link>', r'<Link \1>\2</Link>', content, flags=re.MULTILINE)
44+
45+
# Fix unclosed <code> tags
46+
content = re.sub(r'<code>([^<\n]+)\n', r'`\1`\n', content)
47+
48+
# Fix unclosed <strong> tags
49+
content = re.sub(r'<strong>([^<\n]+)\n', r'**\1**\n', content)
50+
51+
if content != original_content:
52+
with open(filepath, 'w', encoding='utf-8') as f:
53+
f.write(content)
54+
return True
55+
return False
56+
57+
# Fix specific directories
58+
dirs_to_fix = [
59+
'/Users/l/code/layer5/src/collections/service-mesh-books',
60+
'/Users/l/code/layer5/src/collections/careers',
61+
'/Users/l/code/layer5/src/collections/blog'
62+
]
63+
64+
for dir_path in dirs_to_fix:
65+
if os.path.exists(dir_path):
66+
for mdx_file in Path(dir_path).rglob('*.mdx'):
67+
if fix_p_tags_in_file(mdx_file):
68+
print(f"Fixed p tags: {mdx_file}")
69+
for mdx_file in Path(dir_path).rglob('*.md'):
70+
if fix_p_tags_in_file(mdx_file):
71+
print(f"Fixed p tags: {mdx_file}")
72+
73+
print("Done!")

src/collections/blog/2020/2020-06-01-meshery-accepted-into-cncf-landscape/index.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ And this is only the first step - there's already an application filed for Meshe
5353

5454
This is also an invitation to participate - Meshery is a young, ambitious project - it requires a ton of work to make it what it aims to become. Integrating with all of the leading service mesh solutions asks for extensive expertise. In many areas Meshery's functionality is still young. But these are normal growth stages, aren't they? To put it simple - the community and the project need more hands! And these should be your hands!
5555

56-
<p align="center"><i>As already mentioned - Layer5 is a very welcoming bunch!</i></p>
57-
56+
<p align="center"><i>As already mentioned - Layer5 is a very welcoming bunch!</i>
5857
Open source contributions are a must-do for becoming a true cloud native hero. Cloud native is all about the community and one can't be a part of a community by only taking and never giving back. So if you were looking for a promising and welcoming project to join - look no further! Hop on to Layer5 Slack and we'll happily embrace you and help you get started.
5958

6059
And it's not only coding! Documentation, testing, UI design, logos, blogs, videos - you decide where to apply your talent.

src/collections/blog/2020/2020-06-23-google-summer-of-code-2020-service-mesh-performance-with-envoy-nighthawk/index.mdx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,15 @@ import { Link } from "gatsby";
2525

2626
<h4>How did it all start?</h4>
2727
<img src={gsocLogo} className="gsoc-image" align="right" alt="gsoc-image" />
28-
<p>
2928
I was introduced to the Layer5 community by our very own Lee Calcote, and since then I have been exploring the vast world of service meshes and their performance characteristics. Before being accepted as a Google Summer of Code intern, I had been working with the Layer5 community as an active contributor, exploring various new DevOps tooling like service meshes, the sidecar concept, and performance benchmarking of services. I have had a run-in with the Kubernetes community before and initially believed Kubernetes to be the final stage of DevOps, but I was happily surprised when I found out that the end of Kubernetes merely marked the entrypoint to a whole new world of service meshes.
30-
</p>
31-
<p>
3229
And so, we reach the beginning of my GSoC 2020 internship, which began on the night of May 3rd, 2020 when I learned that I had been selected as a GSoC Participant with the Cloud Native Computing Foundation (CNCF). Admittedly, I had tried my best an year ago to get into GSoC’19 with another organisation but due to reasons only Google can tell you, I was not accepted. Everything happens for a reason though, right?
3330
Six months ago, if you would have told me that I would be working with service meshes, gRPC, load testing, performance benchmarking alongside prominent members of the open source world of Cloud Native, I would have ignored you with the least possible amount of prudence I could muster.
34-
</p>
35-
3631
<h4>What is my project about?</h4>
37-
<p>
3832
My GSoC project is to <strong>Enable Distributed Load Testing for various Service Mesh Planes using Envoy Nighthawk</strong>. For those who are not familiar with <a href="https://github.com/envoyproxy/nighthawk">Nighthawk</a>, it is a performance benchmark tool written and maintained by the Envoy community. We are in the process of incorporating Nighthawk into <Link to="/meshery">Meshery</Link> - <i>the cloud native management plane</i>.Meshery already supports performance testing of service meshes using fortio & wrk2 and is maintained by the Layer5 community and is also a member of CNCF Landscape. Alongside this effort, we are creating a new industry standard: <Link to="/projects/cloud-native-performance">Service Mesh Performance Specification</Link> which is another initiative of the Layer5 community to establish a common format for describing and capturing service mesh performance.
39-
</p>
40-
<p>
4133
It has been a month since I have started my GSoC’20 tenure with the Layer5 community, and in this month, I have learned a lot from my code contributions and mentor. I began with setting up the project roadmap and discussing the potential use cases of Nighthawk with its maintainers during my community bonding period. I came to know some incredible people during the community bonding from big tech giants like Google, Facebook, Microsoft, Affirmed Networks, Red Hat and many more to list. Before incorporating Nighthawk, we had to make various enhancements in Meshery, like adding user preferences for performance settings, specifying the SMPS format for exporting and importing of load-test preferences, load-generator interface and more.
42-
</p>
43-
<p>
4434
I have learned a hoard of new things, like gRPC services and how they communicate using protocol buffers, load generation using fortio, writing handlers for various endpoints using golang, and some frontend architecture with Nextjs.
45-
</p>
46-
47-
4835
<h4>About the community</h4>
49-
<p>
5036
Layer5 has one of the healthiest open source communities that I have ever worked with. In the past, I have worked with a variety of well-maintained and large scale open source communities but I have never experienced a more welcoming and nurturing environment than Layer5. At Layer5, we respect each contributor and their contributions, whether it is a new adapter or just a typo fix. If you can contribute, please do. It’s that simple! With many awesome initiatives like SMPS, Distributed Load Testing, Performance Benchmarking, Learn Layer5, and Image Hub, the exponential increase of Layer5 and its various projects is inevitable.
51-
</p>
52-
53-
5437
_**P.S.: If these topics excite you and you want to explore the beautiful realm of service meshes, come and say "Hi" on our [Slack Channel](http://slack.layer5.io) and one of us will reach out to you!**_
5538

5639
</BlogWrapper>

src/collections/blog/2020/2020-07-18-service-mesh-patterns-for-multitenancy/index.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ c. Ingress Gateway in the Worskpace 2 namespace for traffic entry point to the w
9999
<p align="center">
100100
Single Control Plane with Multiple Data Plane each with separate Ingress
101101
Gateway
102-
</p>
103-
104102
- Creation of Control Plane CR and Data Plane CR
105103
A sample CR for creation of the Control plane and Data Plane CR can be referred below :
106104
```sh
@@ -258,11 +256,9 @@ Once this is done the traffic will start flowing the intended gateway and it cou
258256
Please note that in this scenario the Kiali is also accessed via the default control plane ingress-gateway running in the istio-system control plane namespace.
259257

260258
<img src={img3} alt="image" />
261-
<p align="center">Kiali view for Workspace-1</p>
262-
259+
<p align="center">Kiali view for Workspace-1
263260
<img src={img4} alt="image" />
264-
<p align="center">Kiali view for Workspace-2</p>
265-
261+
<p align="center">Kiali view for Workspace-2
266262
Shortly, we will go over the 3rd scenario which is to run multiple Istio Control Planes (Multiple Service Meshes) within the same Kubernetes Cluster. For that, we will need to build an open-shift setup and deploy the Maistra Istio Operator.
267263
Special thanks to the [Istio Community](https://istio.slack.com/) for helping me understand the concepts and also answering my queries and of course to [Lee Calcote](https://calcotestudios.com/talks/), who helped me embark on my Istio journey.
268264

src/collections/blog/2020/2020-08-11-my-journey-from-a-contributor-to-a-maintainer/index.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ Getting involved in something new and essentially avant garde, can be a messy ch
2121

2222
### Get set go!
2323

24-
<p>I was introduced to the world of open source through the <a href="https://meshery.io/">Meshery</a> project in the august of 2019 and have since then been continuously exploring the farthest reaches of Meshery, Layer5, the parent SMI project and consecutively the CNCF landscape.</p>
25-
24+
I was introduced to the world of open source through the <a href="https://meshery.io/">Meshery</a> project in the august of 2019 and have since then been continuously exploring the farthest reaches of Meshery, Layer5, the parent SMI project and consecutively the CNCF landscape.
2625
At the time of writing this, I have been a part of the Meshery project for about a year. Fascinated by the concept and further lured in by the welcoming community at Layer5, I was soon dipping my toes into the tidal wave of code. Starting out with small contributions to improve the UI, I stumbled on to my first issue, which was to open a page in a new tab instead of opening it in the same tab. Basic, right?
2726

2827
I’m pointing this out to unravel the myth and smoke clouds around open source projects. Contributing can be as easy as altering a few lines of code and can be as meaningful as writing a whole new feature adapter. Since then, I have crossed small and big hurdles, meandering through countless issues and have become a part of the wholesome community, gaining friends and mentors along the way.

0 commit comments

Comments
 (0)