03.08 p5.js Editor to GitHub
On this page
How to copy a sketch made with the p5.js Web Editor to GitHub.
Cumbersome Way
- Create an index.html file in the GitHub repository.
- Copy the p5.js editor index.html file contents to the GitHub index.html
- Commit the changes
- Repeat for the sketch.js file and the style.css file
- In the repository settings, click on Pages
- Publish to GitHub Pages from the repository’s main branch.
Easy Way
- Download p5.js sketch from browser file menu
- Open in local code editor
- Initialize repository
- Push to GitHub
- In the repository settings, click on Pages
- Publish to GitHub Pages from the repository’s main branch.