Add a new portfolio project page based on the user's input.
Steps
- •
Parse the user's input from
$ARGUMENTSto extract:- •Project name
- •GitHub repo URL
- •Demo URL (if provided)
- •YouTube video URL (if provided, extract the video ID for embedding)
- •Project description / summary
- •Feature list
- •
Determine
sidebar_position: Read all existingdocs/*.mdfiles, find the highestsidebar_positionvalue, and use the next number. - •
Generate the filename: Convert the project name to kebab-case for the filename (e.g., "Multiplayer Piano" →
multiplayer-piano.md). - •
Create
docs/<filename>.mdusing this template:
markdown
---
sidebar_position: <next_position>
---
# <Project Name>
<One-line summary>
- **Demo**: <demo_url>
- **Source Code**: <github_url>
## Demo
<iframe width="100%" style={{aspectRatio: '16/9'}} src="https://www.youtube.com/embed/<video_id>" title="<Project Name> Demo" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>
## About
<Description paragraph>
## Features
- <feature 1>
- <feature 2>
- ...
Template rules
- •If no YouTube URL is provided, omit the entire
## Demosection and the iframe. - •If no Demo URL is provided, omit the
- **Demo**: ...line. - •For YouTube URLs, extract the video ID from formats like:
- •
https://youtu.be/<id> - •
https://www.youtube.com/watch?v=<id>
- •
- •Write descriptions and features in the same language as the user's input.
- •
Update
docs/intro.md: Add the new project to the## Projectslist, following the existing format:code- [<Project Name>](/docs/<slug>) - <One-line summary>
- •
Show the user a summary of what was created.