Below you’ll find instructions to copy (fork) this repository and set it up for your own experiments.
- STEP 01 - Setup your code and Live Site (with GitHub)
- STEP 02 - Setup Your Code locally (with GitHub Desktop, VS Code and Local Preview plugin)
- STEP 03 - Make it Your Own! (Start editing locally and syncing to Github)
- To “fork” a “repo” is to make your own copy of someone else’s GitHub repository of code.
- To “clone” a “repo” is to make a local synced copy on your machine of an online GitHub repository of code.
- We are using Github and GitHub Pages for our online code and live site.
- We’re using VS Code and GitHub Desktop to edit and sync a local copy of our code with our online code.
- Login OR Create a GitHub account (if you don’t have one).
- Go to the example code repo (https://github.com/sheiva/aframe-starter-pack)
- Fork this repository (button in the upper right)
- Go to your forked repository on GitHub in your browser.
- Click Settings → Pages.
- Under Branch, select:
- Branch:
main - Folder:
/root
- Branch:
- Click Save.
- Wait a couple of minutes for GitHub Pages to publish your site.
- Reload this “Pages” window in GitHub and get your new live site link!
Now you have access to both types of links you’ll submit to Canvas: (1) your live site code, and (2) a link to your code in your repo
- Your GitHub Pages link (your live site)
- Your repository link (your code)
Edit a copy of your code locally and keep everything synced with your online Github repository and live Github Pages site:
- Download and install GitHub Desktop.
Open GitHub Desktop and sign in with your GitHub account. - Download and install Visual Studio Code (VS Code).
In other words, make a local connected copy of your github repository
- Open GitHub Desktop.
- Click File → Clone Repository.
- Select the repo you just forked in your GitHub account.
- Choose where you want the project saved on your computer.
- Click Clone.
- In GitHub Desktop, go to: Repository → Open in Visual Studio Code.
- In VS Code, open the Extensions tab.
- Search for and install Live Preview by Microsoft.
- Right-click
index.htmland choose Show Preview. - Your page should open in a new window in VS Code so you can preview it while you work.
Congratulations! You've set up everything to get going with your own experiments with this Starter Pack! Now, repeat this following steps (Edit Your Code Locally -> Save, Commit and Push) as you continue editing your code. This way your work isn't just saved to your computer but is synced to your Github account (and automatically updates your Github Pages live site).
- In VS Code, open the
index.htmlfile in the main directory. - Add your name in the
index.htmlafter "by"."webAR experiments in A-frame <b>by __YourName____</b>."
- Right-click
index.htmland choose Show Preview. - Your page should open in a new window so you can preview it while you work.
As you work, remember to not just save your files in VS Code but also periodically sync your work to GitHub:
- Go back to GitHub Desktop where you will see your changed files listed.
- Write a commit message describing what you changed in the bottom left.
- Click Commit to main - Mac Shortcut:
Cmd+Enter| PC Shortcut:Ctrl+Enter - Click Push origin - Mac Shortcut:
Cmd+P| PC Shortcut:Ctrl+P