This code is the frontend for the O(fast) platform.
-
Our lessons are created using MDX, which combines JSX and markdown.
-
We do not support dynamic imports/exports. However, we provide some statically imported components for incorporating common lesson features:
-
For writing lessons and viewing rendered MDX code in the O(fast) environment, feel free to utilize O(fast)'s MDX Playground.
-
Open
src/lessons.jsonand add an entry for the new lesson. The key should be a lesson ID that is not already used by other lessons. The value should be an object with the properties:lessonName,lessonGroup, andfiles. ThelessonNameproperty stores a string with the lesson's name. ThelessonGroupproperty stores a string with the name of the lesson group the lesson belongs to. These two properties are used to create and categorize a link to the lesson on the Learn page.filesis an array of strings that represent the paths to mdx lesson files, which store the lesson content. -
Go to
public/lessonsand create a new subdirectory with the name of the lesson ID created in the previous step. Inside this folder, create mdx files to write lesson content in. If you haven't already, go back tosrc/lessons.jsonand populate thefilesarray with the paths to these mdx files, relative to the new lesson subdirectory. In most cases this will simply be the names of the mdx files. -
Refer to existing entries in
src/lessons.jsonfor examples.