Here is a video by Steven Clontz that walks through the process:
https://youtu.be/iFb5Mh_leq0Steven did everything on CoCalc but most of it should adapt to using Windows. (I happen to know Shannon is on Windows ;-) )
I will assume the following prerequisites:
- Git for Windows is installed, including Git Bash
- You've installed Python, and used Python to pip install pretextbook
- VSCode is installed, and set to use Git Bash as its terminal (I think I had the option to do this when I installed it)
[The default is PowerShell. But in PowerShell, you have to do 'python -m pretextbook foo' while in Git Bash you can just do 'pretextbook foo'.]
- You have a GitHub account, and you've created an SSH key in Windows using Git Bash, and added it to your GitHub account
Now you're ready to start your book.
If I remember right, in Steven's walkthrough, he does:
- 'pretext new book' to start a new book project
- change directory into the folder that is created
- 'git init' to initialize this as a git repository
- then publish to GitHub (I forget the steps but I think there's some configuration involved)
An alternative way to get started:
- In GitHub, click the "New" button to add a new repository.
- In the setup page, add a readme and gitignore to initialize the repository. (There is no good template to choose for the gitignore file)
- clone the new repository.
- Back on Windows, do 'pretext new book'. This probably doesn't put the files where you want them, so copy everything into the folder created when you clone your git repository.
- Now use Git Bash or GitHub Desktop to make an initial commit, to add the files to GitHub
With that out of the way, go into the folder you've created for your project.
- run 'pretext build html' to build your html (or 'pretext build html -d' if you need to build diagrams)
- now, as long as everything is working correctly, you can run 'pretext deploy', and your book should get published to GitHub, in a 'docs' folder.
Now in GitHub, go to the Settings tab, choose Pages, and then choose your branch, and the docs folder, to create the book.