Icebreaker One technical documentation. This repository contains the sources for a mkdocs-material build of the technical documentation, including operational guidelines, for IB1 Trust Frameworks.
This documentation is hosted at https://docs.trust.ib1.org
Building the documentation requires Python 3 or later.
You will need to have pipenv installed
pipenv installpipenv shellThe documentation uses mike to manage versioning. This includes a local webserver you can use to test your changes.
mike deploy <version> [latest -u]
e.g. if the current edit is to version 1.2 of the documents, which is also the latest (default served on the site):
mike deploy 1.2 latest -u
The -u flag signals that the latest alias should be updated to the new deployment
mike automatically pushes updates to the gh-pages branch locally.
mike serve
By default, this serves the docs on http://localhost:8000, but you can change this with -a/--dev-addr.
Unlike mkdocs, mike serve doesn't automatically refresh when you make changes, so you need to quit mike serve,
run mike deploy then run mike serve again to view changes.
Each call to mike deploy adds a commit to the gh-pages branch. This leads to a lot of "junk commits" on the gh-pages branch
as you make and test edits. You should reduce these down to a single commit for each substantial change. To do this you will need to find the commit ID of the last commit before you started editing:
git checkout gh-pages
git log
This outputs a log of all commits on the branch in reverse order e.g.
commit xxxxxxxxxxxxxxxxxxxx4 (HEAD -> gh-pages)
Author: Alice <alice@example.com>
Date: Fri Dec 16 17:09:23 2022 +0000
Deployed xxxxxxx to 0.1 with MkDocs 1.4.2 and mike 1.1.2
commit xxxxxxxxxxxxxxxxxxxx3 (HEAD -> gh-pages)
Author: Alice <alice@example.com>
Date: Fri Dec 16 17:09:22 2022 +0000
Deployed xxxxxxx to 0.1 with MkDocs 1.4.2 and mike 1.1.2
commit xxxxxxxxxxxxxxxxxxxx2 (HEAD -> gh-pages)
Author: Alice <alice@example.com>
Date: Fri Dec 16 17:09:21 2022 +0000
Deployed xxxxxxx to 0.1 with MkDocs 1.4.2 and mike 1.1.2
commit xxxxxxxxxxxxxxxxxxxx1
Author: Bob <bob@example.com>
Date: Thu Dec 15 14:12:36 2022 +0000
Update the docs to something interesting
...
You need to rebase all your recent local changes on the last meaningful commit - "Update the docs to something interesting" in the above example -
and then re-commit and push that to gh-pages on the remote.
git reset --soft xxxxxxxxxxxxxxxxxxxx1
git commit -m "My meaningful commit"
git push
Finally, assuming you were working in master, check out master again so you don't accidentally edit the gh-pages branch.
git checkout master
- Create a new branch off
mainto do the changes. - If you need to update the glossary, run the python script
build_glossary.py. This takes the data from https://docs.google.com/spreadsheets/d/1W4mk3hGTmVg8tt5wA0Ce8c7q69LdIxJQX1IMSQkeLuE/edit?usp=sharing and generatesdocs/glossary.md. - List versions in
mikeusingmike listand identify which version you are wanting to update or iterate. - Deploy a new version of the documentation using
mike. If you are iterating the version, then usemike deploy <version> latest -uwhich says to create a new version, and move thelatestalias to this new version. If you are updating the existing version, thenmike deploy <version>. - Check the changes on https://localhost:8000 with
mike serve. - If the local version shows the correct changes, then commit the changes to the branch.
- Push the branch to the GitHub repository.
- Generate a PR on GitHub from the branch just pushed to the
mainbranch on GitHub. - To deploy the changes to the website,
mike deploywill generate a separate new commit to thegh-pagesbranch, so push the changes in localgh-pagestogit push origin gh-pagesto make the changes live.
When you've finished editing, you can deactivate the virtual environment, or just close the Terminal window
deactivate