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
- Yarn
npm run dev
yarn dev
Build
- npm
- Yarn
npm run build
yarn build