Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 4efe936

Browse files
committed
more documentation and new paver tasks for setting up the repo
1 parent 7e97930 commit 4efe936

File tree

2 files changed

+37
-8
lines changed

2 files changed

+37
-8
lines changed

README.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,38 @@ Once paver is installed you will also need to install sphinxcontrib-paverutils,
3333

3434
# pip install sphinxcontrib-paverutils
3535

36-
Publishing your own materials with Runestone
37-
--------------------------------------------
36+
Quick Start
37+
-----------
3838

39-
1. Clone the RunestoneTools repository to your development machine
40-
2. Create a repository (if you don't already have one where you would like to host the finished product)
41-
3. paver build
39+
This guide will get you started with creating your own course materials using the Runestone tools.
40+
41+
1. Clone the RunestoneTools repository to your development machine ``git clone https://github.com/RunestoneInteractive/RunestoneTools.git``
42+
43+
2. Type the command ``paver build``
44+
45+
You will now have a build folder with a file index.html in it, along with some default content. The contents of the build folder are suitable for hosting anywhere that you can serve static web content from! For a small class you could even serve the content using the builtin Python webserver.
46+
47+
::
48+
49+
$ cd build
50+
$ python3 -m http.server
51+
52+
Now from your browser you can open up http://localhost:8000/index.html
53+
54+
Running your own web server isn't always the easiest way to go. So I have provided a couple of commands to make it easy for you to host your materials using githubs Pages feature.
55+
56+
57+
2. Create a repository (if you don't already have one where you would like to host the finished product) Copy the github URL to your clipboard.
58+
2. Type the command ``paver setup_github_pages`` You will be prompted to paste in the URL to your repository.
59+
2. Type the command ``paver deploy``
60+
2. Now you can access your pages from github at http://username.github.io/repo where username is your github username, and repo is the repository you created to host your deployed pages. Note that the deployed pages will be on the branch ``gh-pages``
61+
62+
Details
63+
~~~~~~~
64+
65+
If you want to know the details of what goes on in the paver commands above here is what is happening:
66+
67+
3. paver build -- creates build directory and html files
4268
4. cd build
4369
5. git init
4470
5. git remote add origin [email protected]:bnmnetp/deploytest.git

pavement.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,17 @@ def build(options):
6363

6464
@task
6565
def setup_github_pages(options):
66-
repo = input("paste your repo URL here: ")
66+
if sys.version > '3':
67+
repo = input("paste your repo URL here: ")
68+
else:
69+
repo = raw_input("paste your repo URL here: ")
6770
os.chdir(options.build.builddir)
6871
sh("git init")
6972
sh("git remote add origin %s " % repo)
70-
sh("checkout -b gh-pages")
73+
sh("git checkout -b gh-pages")
7174
sh("touch .nojekyll")
7275
sh("git add .nojekyll")
73-
sh("git commit -m 'Create repo and branch'")
76+
sh("git commit -m 'Create repo and gh-pages branch'")
7477
sh("git push --set-upstream origin gh-pages")
7578
sh("git push origin gh-pages")
7679

0 commit comments

Comments
 (0)