p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

Add new tutorial: #1 Embedding p5.js with an iframe

Open hxrshxz opened this issue 2 months ago • 1 comments

Addresses #999

Description

Adds new tutorial "Embedding p5.js with an iframe" to the 2.0 branch and fixes a bug in TutorialLayout.

Changes

  • New tutorial: embedding-p5-with-iframe.mdx - Comprehensive guide on embedding p5.js sketches using iframes
  • New category: Added "beyond-web-editor" to tutorials config
  • Bug fix: Added optional chaining in TutorialLayout.astro for optional featuredImage and authors fields to prevent crashes

Tutorial Details

  • Category: beyond-web-editor
  • Authors: hxrshxz, Dave Pagurek
  • Covers: iframe basics, global mode, multiple sketches, security, responsive design, and best practices

The optional chaining fix prevents TypeError when tutorials don't include the optional featuredImage or authors frontmatter fields.

hxrshxz avatar Oct 18 '25 18:10 hxrshxz