Skip to main content

Installation

Requirements

  • Node.js version >= 14 or above (which can be checked by running node -v). You can use nvm for managing multiple Node versions on a single machine installed

  • Yarn version >= 1.5 (which can be checked by running yarn --version). Yarn is a performant package manager for JavaScript and replaces the npm client. It is not strictly necessary but highly encouraged.

Scaffold project website

The easiest way to use Awesome Course is to use the command line tool that helps you scaffold a skeleton course website. You can run this command anywhere in a new empty repository or within an existing repository, it will create a new directory containing the scaffolded files.

npx awesome-course [name]

Example:

npx awesome-course react-training

If you do not specify name, it will prompt you for them. Awesome Course provides one template to get started for now. We will be working on new templates to provide soon.

Project structure

Assuming you named your course as react-training, you will see the following files generated under a new directory my-website/.

reac-training
β”œβ”€β”€ course
β”‚ β”œβ”€β”€ lesson-1
β”‚ β”œβ”€β”€β”€β”€β”€ start.md
β”‚ β”œβ”€β”€β”€β”€β”€ completed.md
β”‚ β”œβ”€β”€β”€β”€β”€ chapter-1
β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€ answer.js
β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€ question.js
β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€ readme.md
β”‚ β”œβ”€β”€β”€β”€β”€ chapter-2
β”‚ β”œβ”€β”€β”€β”€β”€ chapter-3
β”‚ β”œβ”€β”€ lesson-2
β”‚ β”œβ”€β”€β”€β”€β”€ start.md
β”‚ β”œβ”€β”€β”€β”€β”€ completed.md
β”‚ β”œβ”€β”€β”€β”€β”€ chapter-1
β”‚ β”œβ”€β”€β”€β”€β”€ chapter-2
β”‚ β”œβ”€β”€β”€β”€β”€ chapter-3
β”œβ”€β”€ pages
β”‚ β”œβ”€β”€ lesson
β”‚ β”œβ”€β”€β”€β”€ [lessonId]
β”‚ β”œβ”€β”€β”€β”€β”€β”€ chapter
β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€ [chapterId].js
β”‚ β”œβ”€β”€β”€β”€β”€β”€ completed.js
β”‚ β”œβ”€β”€β”€β”€ [lessonId].js
β”‚ β”œβ”€β”€ _app_.md
β”‚ β”œβ”€β”€ index.js
β”‚ └── mdx.md
β”œβ”€β”€ public
β”‚ β”œβ”€β”€ svg
β”‚ └── favicon.ico
β”œβ”€β”€ src
β”‚ β”œβ”€β”€ components
β”‚ β”œβ”€β”€ context
β”‚ β”œβ”€β”€ lib
β”‚ β”œβ”€β”€ types
β”‚ └── utils
β”œβ”€β”€ styles
β”œβ”€β”€ next.config.js
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ postcss.config.js
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ tsconfig.json
└── yarn.lock

Project structure rundown

  • /course - Contains the course content both markdown and code files. Here it is important to follow rules to be able to create your course.
  • /pages - Contains the custom pages like home page. Also you can add other pages, bacause of it is Next.js based, it would be good to know how Next.js works.
  • /public - Contains assets that used in project such as favicons, svg icons, background images etc.
  • /src - Contains custom React Components used in the project.
  • /styles - Contains style files that used in the project. This project uses Tailwind. You may want to check it also.

Running the development server

npm run dev

Build

npm run build