This is a website written using asciidoctor. Below are instructions on getting the repositories working if you are going to make edits to the website.
I do not want any messy merging conflicts! To avoid this please keep the master and gh-pages separate on your computer!
-
When checking out the code, check them out into two directories:
$ git clone https://github.com/LSDtopotools/LSDTopoTools_workshop.git master $ git clone https://github.com/LSDtopotools/LSDTopoTools_workshop.git gh-pages
-
In the gh-pages directory, check out the gh-pages branch and get rid of the master branch:
$ cd gh-pages $ git checkout origin/gh-pages -b gh-pages $ git branch -d master
-
Now, go back to the master branch, you can make changes there.
-
When you commit changes to the master branch and you want to update the website, commit and push changes, then run bundle:
$ pwd my/path/to/repo/book_template/master/ $ git commit -m "My latest commit" . $ git push -u origin master $ bundle exec rake book:build_html
-
Now copy any new image files to the /images folder in the gh-pages branch (you will need to git add them), and rename NMDM.html to index.html and copy to the gh-pages folder.
$ pwd my/path/to/repo/book_template/gh-pages/ $ cd images $ git add <filenames of new images> $ cd .. $ git commit "updating website" .
-
Now push the changes to the gh-pages branch
$ bundle exec rake book:build_html
$ pwd my/path/to/repo/book_template/gh-pages/ $ git push -u origin gh-pages