Skip to docs navigation

03.08 p5.js Editor to GitHub

How to copy a sketch made with the p5.js Web Editor to GitHub.

Cumbersome Way

  1. Create an index.html file in the GitHub repository.
  2. Copy the p5.js editor index.html file contents to the GitHub index.html
  3. Commit the changes
  4. Repeat for the sketch.js file and the style.css file
  5. In the repository settings, click on Pages
  6. Publish to GitHub Pages from the repository’s main branch.

Easy Way

  1. Download p5.js sketch from browser file menu
  2. Open in local code editor
  3. Initialize repository
  4. Push to GitHub
  5. In the repository settings, click on Pages
  6. Publish to GitHub Pages from the repository’s main branch.