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

learning-paths: mastering meshery and kubernetes for engineers #5982

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fix redirect bug and rm hardcoded istio path
Signed-off-by: Touriist <126756092+Touriist@users.noreply.github.com>
  • Loading branch information
Touriist committed Oct 18, 2024
commit 30a810c30181896601782c7a6d2122447f8ce27b
3 changes: 2 additions & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -863,13 +863,14 @@ const createCoursesListPage = ({ envCreatePage, node }) => {
};

const createCourseOverviewPage = ({ envCreatePage, node }) => {
const { learnpath, slug, course, pageType, permalink } = node.fields;
const { learnpath, slug, course, pageType, permalink,section } = node.fields;

envCreatePage({
path: `${slug}`,
component: path.resolve("src/templates/course-overview.js"),
context: {
learnpath,
section,
slug,
course,
pageType,
Expand Down
9 changes: 6 additions & 3 deletions src/sections/Learn-Layer5/Chapters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ const Chapters = ({ chapterData, courseData, location, serviceMeshesList, TOCDat
<>
<div className={`service-mesh-image ${isMeshActive(sm.section) ? "service-mesh-image-active" : ""}`} key={index}>
<Link to={`/${sm.slug}`} data-tooltip-id="mesh-name" data-tooltip-content={capitalize(sm.section)} className="course" key={index}>
<h2>hi </h2>
<Image
{...findServiceMeshImage(serviceMeshImages, sm.section).imagepath}
className="docker"
alt={sm.section}
/>
</Link>
</div>
<Tooltip
Expand All @@ -95,10 +99,9 @@ const Chapters = ({ chapterData, courseData, location, serviceMeshesList, TOCDat
<div className="toc-switcher-parent-div">
<TOC courseData={courseData} TOCData={TOCData} chapterData={chapterData} location={location} />
<div>
{ console.log(availableServiceMeshesArray)}
{availableServiceMeshesArray.length != 0 && (
<>
<h4>Service Meshes Available</h4>
<h4>Technologies Available</h4>
<div className="service-mesh-switcher">
<ServiceMeshesAvailable serviceMeshes={availableServiceMeshesArray} />
</div>
Expand Down
6 changes: 4 additions & 2 deletions src/sections/Learn-Layer5/Course-Overview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import SubscribeLearnPath from "../../subscribe/SubscribeLearnPath";
import BookmarkNotification from "../../../components/Learn-Components/BookmarkNotification";

const CourseOverview = ({ course, chapters, serviceMeshesList }) => {

const extractedSection = (chapters.length > 0 ? chapters[0].fields.section : "");
const [hasBookmark, setHasBookmark] = useState(false);
const [bookmarkUrl, setBookmarkUrl] = useState("");
const [showNotification, setShowNotification] = useState(true);
Expand Down Expand Up @@ -112,7 +114,7 @@ const CourseOverview = ({ course, chapters, serviceMeshesList }) => {
</SRLWrapper>
<h2 className="course-toc">Table Of Contents</h2>
{course.frontmatter.toc.map((item, index) => (
<Link key={index} to={`istio/${item}`} className="chapter-link">
<Link key={index} to={`${extractedSection}/${item}`} className="chapter-link">
<ChapterCard
chapterNum={index + 1}
chapter={getChapterTitle(item, chapters)}
Expand All @@ -126,7 +128,7 @@ const CourseOverview = ({ course, chapters, serviceMeshesList }) => {
{ console.log("array: ",availableServiceMeshes)}
{availableServiceMeshes.length != 0 && (
<>
<h2>Service Meshes You Can Learn</h2>
<h2>Technologies You Can Learn</h2>
<ServiceMeshesAvailable serviceMeshes={availableServiceMeshes} />
</>
)}
Expand Down
Loading