Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I want to host a website on the same repository as my project using Jekyll, but I want it filed neatly in its own subfloder like so:
- /
- |- File1
- |- File2
- |- jasper2
- |- repo-pages
- 1. Create a new branch called "gh-pages"
- ```git checkout -b gh-pages```
- 1b. Change back to the master branch
- ```git checkout master```
- 2. If you want to use the jasper2 theme, you can clone it in your directory (or simply download its content):
- ``` git clone git@github.com:jekyller/jasper2.git```
- 3. create a new folder called "repo-pages" in which Jekyll will generate the static pages
- ```mkdir repo-pages```
- 4. In the "_config.yml" file, change the configuration:
- ```
- username: parastuffs
- repo: esnu
- branch: gh-pages
- relative_source: ../jasper2/
- destination: ../repo-pages/
- ```
- 5. Generate the static pages from the "jasper2" folder:
- ```bundle exec jekyll serve```
- 6. From the repo's root folder, push the subtree:
- ```
- git checkout gh-pages
- git add repo-pages/
- git commit -m "pages"
- git subtree push --prefix repo-pages origin gh-pages
- ```
- This last command is ```git subtree push --prefix <folder> origin <branch>``` to set the root of the branch to folder.
- Now check online if everything is OK.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement