Core Interaction Spring 2018 โ†‘

We can connect our blogs websites to a new domain using github and a few special settings / files. Will we do this by creating a new github repo for your final project / blog inside of our preexisting git repo ๐Ÿคฏ and then connecting that domain to your github using a CNAME file.

Step 1: Create A New Repo

First create a new repo (without a README!) on github. Name it appropriately (e.g: โ€˜ci-studioโ€™, or โ€˜whatever-your-theme-isโ€™).

Alright, back to your local files. Your class folder structure should look something like this:

๐Ÿ“‚ site/
โ”œโ”€ ๐Ÿ“„ index.html 
โ”œโ”€ ๐ŸŒธ favicon.ico 
โ”œโ”€ ๐Ÿ“‚ assets/
โ”‚  โ”œโ”€ ๐Ÿ“ css/
โ”‚  โ””โ”€ ๐Ÿ“ js/
โ”œโ”€ ๐Ÿ“‚ studio/
โ”‚  โ”œโ”€ ๐Ÿ“ week-01/
โ”‚  โ””โ”€ etc...
โ””โ”€ ๐Ÿ“‚ lab/ 
   โ”œโ”€ ๐Ÿ“ 01_project-name/
   โ””โ”€ etc...

Navigate to your core-interaction studio folder on your computer using terminal:

cd /path/to/core-interaction/site/studio

Then initialize a new github repo within this folder by running this command in the same terminal window. Make sure to swap out โ€˜usernameโ€™ and โ€˜repoโ€™ in the URL for your actual username and repo name:

git init
git add .
git commit -m "first commit"
git remote add origin
git push -u origin master

Step 2: Add CNAME File

Alright, your studio files should be up on git, and your studio folderโ€™s index.html should be at the root of that repository.

Make a new file in your studioโ€™s root folder with a filename of CNAME and add your domain info inside:

Now, add and push the changes in your local repo to github:

git add .
git commit -m 'add CNAME file'
git push origin master

Step 3: Configure Google Domains DNS Records

Open up a browser and go to . Head to the โ€œConfigure DNSโ€ tab and scroll to the โ€œCustom resource recordsโ€ section at the bottom of the page.

Add two @ type A Records that point to the GitHub IPโ€™s: and and one www CNAME record that points to your url

Your site should now be live at your given domain!