-
Couldn't load subscription status.
- Fork 180
Add new tutorial: #1 Embedding p5.js with an iframe #1007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a new tutorial on embedding p5.js sketches via iframes and introduces a defensive fix in the tutorial layout to avoid crashes when optional frontmatter is missing.
- New tutorial: Embedding p5.js with iframes, including examples, performance tips, and accessibility notes
- New category: beyond-web-editor added to tutorials config
- Layout fix: Optional chaining for authors and featuredImage in TutorialLayout to prevent runtime errors
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/layouts/TutorialLayout.astro | Uses optional chaining for authors and featuredImage to avoid crashes when missing. |
| src/content/tutorials/en/embedding-p5-with-iframe.mdx | Adds comprehensive tutorial content with examples and code snippets. |
| src/content/tutorials/config.ts | Registers new tutorial category beyond-web-editor. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
27d704f to
9c21440
Compare
src/layouts/TutorialLayout.astro
Outdated
| locale={currentLocale} | ||
| description={entry.data.authors.join(", ")} | ||
| featuredImageSrc={entry.data.featuredImage.src} | ||
| description={entry.data.description} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hxrshxz ! Could you revert this change, please? Or was it intentional? It's important to maintain the authorship info for the tutorials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ksen0 sorry I have reverted it back it was based on the copilot's suggestion above which ig I misunderstood

…torial description
Addresses #999
Description
Adds new tutorial "Embedding p5.js with an iframe" to the 2.0 branch and fixes a bug in TutorialLayout.
Changes
embedding-p5-with-iframe.mdx- Comprehensive guide on embedding p5.js sketches using iframes"beyond-web-editor"to tutorials configTutorialLayout.astrofor optionalfeaturedImageandauthorsfields to prevent crashesTutorial Details
The optional chaining fix prevents TypeError when tutorials don't include the optional
featuredImageorauthorsfrontmatter fields.