-
Notifications
You must be signed in to change notification settings - Fork 24
Authoring
The project is set up to use GitHub Codespaces to supporting authoring within the web browser, or a locally installed VS Code application.
TIP: Use Chrome.
Our codespace is set up to allow the authoring of our web and print targets using the PreTeXt authoring toolkit described in the PreTeXt Guide.
-
PreTeXt Cheatsheets:
-
Crash course video tutorial (recorded Oct 10): https://youtu.be/dPFCF8GL1aE
- Create a new branch.
- Make your changes. Be sure to preview the output.
- Commit and pushyour changes.
Note: if you receive the error message Can't push refs to remote. Try running "Pull" first to integrate your changes.
, you forgot to create a new branch. See below about fixing branch issues.
- Create a pull request.
See here for detailed instructions with screenshots of how to do this in Codespaces.
Currently CheckIt is not set up to work with Codespaces, but the bank can still be built.
python scripts/bank/build.py
These steps should be followed from the main
branch only to ensure
only the accepted changes to the book are deployed to the public.
-
build web
target using PreTeXt -
build print
target using PreTeXt -
build slides
target using PreTeXt -
build worksheet
target using PreTeXt - Build bank using
python scripts/bank/build.py
- One liner:
pretext build web && pretext build print && pretext build slides && pretext build worksheet && python scripts/bank/build.py
- One liner:
-
deploy
using PreTeXt-
pretext deploy --preview
can be used to stage what deployment will look like inoutput/stage
and open a preview browser
-
Alternatively, all (non Checkit) pretext targets can be built using
for TARGET in $(xpath -q -e '//target[not(@name="checkit")]/@name' project.ptx | sed 's/name="//' | sed 's/"//'); do pretext build $TARGET; done
If you accidentally make updates to the main
branch, after pushing you will get the error message
Can't push refs to remote. Try running "Pull" first to integrate your changes.
To fix this, open the Terminal and copy-paste the following lines into the Terminal to fix your Git history:
BRANCH=branchfix-`xxd -l3 -ps /dev/urandom`
git stash
git branch $BRANCH
git reset --hard origin/main
git checkout $BRANCH
git stash pop