Giter Site home page Giter Site logo

react-quick-start's Introduction

TutorialKit Starter

πŸ‘‹ Welcome to TutorialKit!

This README includes everything you need to start writing your tutorial content quickly.

Project Structure

.
β”œβ”€β”€ astro.config.mjs    # TutorialKit uses Astro πŸš€ (https://astro.build)
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ ...
β”‚   β”œβ”€β”€ content
β”‚   β”‚   └── tutorial    # Your tutorial content lives here
β”‚   └── templates       # Your templates (see below for more information)
β”œβ”€β”€ public
β”‚   β”œβ”€β”€ favicon.svg
β”‚   └── logo.svg        # Default logo used in top left for your tutorial
β”œβ”€β”€ ...
β”œβ”€β”€ theme.ts            # Customize the theme of the tutorial
└── uno.config.ts       # UnoCSS config (https://unocss.dev/)

Getting Started

Make sure you have all dependencies installed and started the dev server:

npm install
npm run dev

UI Structure

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ ● ● ●                                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                           β”‚                         β”‚
β”‚                           β”‚                         β”‚
β”‚                           β”‚                         β”‚
β”‚                           β”‚                         β”‚
β”‚                           β”‚       Code Editor       β”‚
β”‚                           β”‚                         β”‚
β”‚                           β”‚                         β”‚
β”‚                           β”‚                         β”‚
β”‚                           β”‚                         β”‚
β”‚          Content          β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                           β”‚                         β”‚
β”‚                           β”‚                         β”‚
β”‚                           β”‚  Preview & Boot Screen  β”‚
β”‚                           β”‚                         β”‚
β”‚                           β”‚                         β”‚
β”‚                           β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                           β”‚                         β”‚
β”‚                           β”‚        Terminal         β”‚
β”‚                           β”‚                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Authoring Content

A tutorial consists of parts, chapters, and lessons. For example:

  • Part 1: Basics of Vite
    • Chapter 1: Introduction
      • Lesson 1: Welcome!
      • Lesson 2: Why Vite?
      • …
    • Chapter 2: Your first Vite project
  • Part 2: CLI
    • …

Your content is organized into lessons, with chapters and parts providing a structure and defining common metadata for these lessons.

Here’s an example of how it would look like in src/content/tutorial:

tutorial
β”œβ”€β”€ 1-basics-of-vite
β”‚   β”œβ”€β”€ 1-introduction
β”‚   β”‚   β”œβ”€β”€ 1-welcome
β”‚   β”‚   β”‚   β”œβ”€β”€ content.md    # The content of your lesson
β”‚   β”‚   β”‚   β”œβ”€β”€ _files        # Initial set of files
β”‚   β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”‚   └── _solution     # Solution of the lesson
β”‚   β”‚   β”‚       └── ...
β”‚   β”‚   β”œβ”€β”€ 2-why-vite
β”‚   β”‚   β”‚   β”œβ”€β”€ content.md
β”‚   β”‚   β”‚   └── _files
β”‚   β”‚   β”‚       └── ...
β”‚   β”‚   └── meta.md           # Metadata for the chapter
β”‚   └── meta.md               # Metadata for the part
β”œβ”€β”€ 2-advanced
β”‚   β”œβ”€β”€ ...
β”‚   └── meta.md
└── meta.md                   # Metadata for the tutorial

Supported Content Formats

Content can be either written as Markdown (.md) files or using MDX (.mdx). Files have a Front Matter at the top that contains the metadata and everything that comes after is the content of your lesson.

Example

---
type: lesson
title: Welcome!
---

# Welcome to TutorialKit!

In this tutorial we'll walk you through how to setup your environment to
write your first tutorial 🀩

The metadata file (meta.md) of parts, chapters, and lessons do not contain any content. It only contains the Front Matter for configuration.

Metadata

Here is an overview of the properties that can be used as part of the Front Matter:

Property Required Type Inherited Description
type βœ… part | chapter | lesson ❌ The type of the metadata.
title βœ… string ❌ The title of the part, chapter, or lesson.
slug string ❌ Let’s you customize the URL pathname which is /:partSlug/:chapterSlug/:lessonSlug.
previews Preview[] βœ… Configure which ports should be used for the previews. If not specified, the lowest port will be used.
autoReload boolean βœ… Navigating to a lesson that specifies autoReload will always reload the preview. This is typically only needed if your server does not support HMR.
prepareCommands Command[] βœ… List of commands to execute sequentially. They are typically used to install dependencies or to run scripts.
mainCommand Command βœ… The main command to be executed. This command will run after the prepareCommands.

A Command has the following shape:

string | [command: string, title: string] | { command: string, title: string }

The title is used as part of the boot screen (see UI Structure).

A Preview has the following shape:

string | [port: number, title: string] | { port: number, title: string }

In most cases, metadata is inherited. For example, if you specify a mainCommand on a chapter without specifying it on any of its lessons, each lesson will use the mainCommand from its respective chapter. This extends to chapter and parts as well.

react-quick-start's People

Contributors

carlevison avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.