This repository includes a tutorial template and script to help create new tutorials consistently.
The template (src/pages/guides/tutorials/tutorial-template.md
) provides a standardized structure for tutorials with sections for:
- Prerequisites
- Implementation steps
- Code examples
- Testing instructions
- Common issues and solutions
- Next steps
- Related resources
- Use the provided script:
npm run create-tutorial
-
The script will prompt for:
- Tutorial name (for folder structure)
- Tutorial title
- Description
- GitHub username
-
The script will:
- Create a new directory under
src/pages/guides/tutorials/
- Generate an
index.md
file from the template - Replace key placeholders with provided information
- Create a new directory under
Each tutorial should include:
tutorials/
└── your-tutorial-name/
└── index.md
- Add your tutorial content
- Update the key learning objectives
- Add code examples and screenshots
- Test all code samples
The tutorial template includes these main sections:
- Prerequisites - Required setup and knowledge
- What you'll build - Overview of the end result
- Project Setup - Initial configuration steps
- Implementation Steps - Main tutorial content
- Testing - Validation steps
- Common Issues - Troubleshooting guide
- Next Steps - Further learning paths
- Related Resources - Additional documentation
When creating a new tutorial:
- Follow the existing template structure
- Include clear code examples
- Add helpful screenshots where needed
- Link to relevant documentation
- Include troubleshooting tips
- Test all code samples thoroughly
For more information, see:
To run the sample, cd
into v4-sample
first and follow the instructions in the sample.md file.
Before raising a pull request, please run the following tests:
yarn test:links
yarn test:lint
Markdown linting errors can be fixed automatically (with some luck) by running:
yarn fix:lint