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