Skip to content

Authoring

Steven Clontz edited this page Jul 22, 2024 · 4 revisions

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, Firefox, or Edge.

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.

General Workflow

  1. Pull (or sync) the main branch.
  2. Create a new branch.
  3. Make your changes. Be sure to preview the output.
  4. Commit and push your 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.

  1. Create a pull request.

See here for detailed instructions with screenshots of how to do this in Codespaces.

Building exercise bank

Currently CheckIt is not set up to work with Codespaces, but the bank can still be built.

python scripts/bank/build.py

Deploying to the public

All changes merged into the main branch are automatically built and deployed to the public at https://tbil.org as the "Preview Edition".

How to fix branch issues

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