Eleventy Recipes Wordmark

Eleventy Recipes

Create a Github repository for your Eleventy site

By Mike Aparicio

Using Github will allow us to version control our project and make things like deploying our site easier.

Prerequisites

What you'll need

☑️ A Github account

Directions

  1. Create a .gitignore file and add the node_modules and _site folders
echo 'node_modules\n_site' > .gitignore
  1. Initialize your repo
git init
  1. Add all files to be committed
git add --all
  1. Commit the files
git commit -m "Initial commit"
  1. Log into Github and select "New Repository" from the menu next to your profile.
  2. Give your repo a name (my-eleventy-project)
  3. Click "Create Repository"
  4. On the next page copy the two lines under "...or push an existing repository from the command line"
  5. Paste them into the terminal. They should look like this:
git remote add origin [remote repository URL]
git push -u origin master

Resources