#Create A Static Site Using Harp and GitHub Pages
This repository demonstrates an example of how to create a static site that can be hosted on GitHub using GitHub Pages.
##Dependencies
- Node 5.6.0+
- NPM 3.6.0+
##Steps ####harp.js
- Create and clone a GitHub repo
cd path/to/repo
andnpm init
- Create a directory with the same name as your repo within your repo
- example-repo -> example-repo
- Create .jade files within this new folder
- example-repo -> example-repo -> views -> layout.jade
npm install --save-dev harp
node_modules/.bin/harp server .
- Note the dot (
.
) at the end
- Note the dot (
- Browse to http://localhost:9000/example-repo
####jspm
npm install --save-dev jspm
jspm init
- baseURL = ./example-repo
- jspm packages folder = ./example-repo/scripts/jspm_packages
- config file path = ./example-repo/scripts/config.js
- client baseURL = /example-repo
####code
- Add desired styles, templates, scripts, and other files as desired
node_modules/.bin/harp compile example-repo dist
- Add a .gitignore file
- include node_modules and example-repo/**/jspm_packages but do not include any files in dist
####GitHub
- Commit and push everything
git subtree push origin gh-pages -P dist
- git-subtree
A subtree is just a subdirectory that can be committed to, branched, and merged along with your project in any way you want.
- -P or --prefix
Specify the path in the repository to the subtree you want to manipulate.
- git-subtree
##Helpful Links