diff --git a/book/_toc.yml b/book/_toc.yml index 223bb61..e04ffc8 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -98,6 +98,7 @@ parts: sections: - file: external/annotater/README.md - file: basic-features/hypothesis.md + - file: features/teachbooks - caption: Examples chapters: diff --git a/book/features/draft-release.md b/book/features/draft-release.md index 9b62b51..8e36ea5 100644 --- a/book/features/draft-release.md +++ b/book/features/draft-release.md @@ -6,7 +6,7 @@ This page is useful for user type 3-5. ``` -{bdg-secondary}`Python Package: teachbooks` +{bdg-link-secondary}`Python Package: teachbooks <./teachbooks.html>` Often it is necessary to prepare, review and edit materials in parallel to material that is currently being used by students, or another target audience. This workflow enables an author to easily maintain separate versions of a book without having to repeatedly comment out lines of a table of contents or page when building different versions. It is also easy to implement in CI/CD settings (it is already implemented in the {ref}`Deploy Book Workflow `, which builds our TeachBooks). diff --git a/book/features/external_toc.md b/book/features/external_toc.md index 9175ff4..30a460a 100644 --- a/book/features/external_toc.md +++ b/book/features/external_toc.md @@ -6,7 +6,7 @@ This page is useful for user type 3-5. ``` -{bdg-secondary}`Python Package: teachbooks` +{bdg-link-secondary}`Python Package: teachbooks <./teachbooks.html>` ## Introduction diff --git a/book/features/local_server.md b/book/features/local_server.md index fcdbbc1..8539b0b 100644 --- a/book/features/local_server.md +++ b/book/features/local_server.md @@ -6,7 +6,7 @@ This section is useful for user type 4-5. ``` -{bdg-secondary}`Python Package: teachbooks` +{bdg-link-secondary}`Python Package: teachbooks <./teachbooks.html>` Perhaps you have already noticed that when building a book and testing it locally on your computer, some features do not work the way you expect, or worse---do not work at all! This is because many interactive features rely on browser functionality to work properly, for example: Grasple/H5p iframe exercises, Sphinx-Thebe Python interactivity and HTML/Javascript elements. Although the website is _static_ (i.e., there is no code running on a webserver that generates the content), modern web browsers have their own internal computing environments that run processes to deliver the rich content we desire in our books. diff --git a/book/features/overview.md b/book/features/overview.md index 4a6cd20..e59742d 100644 --- a/book/features/overview.md +++ b/book/features/overview.md @@ -13,7 +13,7 @@ Additionally, not all features are built and shared in the same way. We do our b - {bdg-warning}`Javascript overlay` - {bdg-success}`Chrome Extension` - {bdg-white}`GitHub App and Javascript script` -- {bdg-secondary}`Python Package: teachbooks` +- {bdg-link-secondary}`Python Package: teachbooks <./teachbooks.html>` - {bdg-light}`GitHub Reusable Action` - {bdg-light}`GitHub Template` - {bdg-dark}`Git Workflow` diff --git a/book/features/teachbooks.md b/book/features/teachbooks.md new file mode 100644 index 0000000..9a7d127 --- /dev/null +++ b/book/features/teachbooks.md @@ -0,0 +1,28 @@ +# TeachBooks Python Package + +```{admonition} User types +:class: tip +This section is useful for user type 4-5. +``` + +{bdg-secondary}`Python Package: teachbooks` + +The TeachBooks Python package is a collection of tools that are used to enhance the Jupyter Book software package by adding features and making customization easier. In general, it is only of interest to user types 4 and 5 when building a book locally. However, it may be important for other users to know what the package does, as it is incorporated in the [Deploy Book Workflow](./deploy-book-workflow.md) and, therefore, any book created from the [TeachBooks Template](./teachbooks-template.md). This raises two important points: + +1. If you are a book user using the [TeachBooks Template](./teachbooks-template.md) or the [Deploy Book Workflow](./deploy-book-workflow.md), your book is by default built with the `teachbooks` package, and the way your book is built and features that are included in the book may change automatically when it is updated (these will be non-breaking changes; if not, we will notify our mailing list). +2. If you are using the `jupyter-book` package to build your book, some of the features described in this Manual may not be available to you (i.e., those listed on this page). This will be the case if you are using a [setup described in the Jupyter Book Manual](https://jupyterbook.org/en/stable/publish/web.html), for example, [this GitHub workflow](https://jupyterbook.org/en/stable/publish/gh-pages.html). + +For those who wish to use the package, it is available on [PyPI](https://pypi.org/project/teachbooks/) and can be installed using `pip install teachbooks`. It adds a few commands to the CLI (e.g., `serve`), but otherwise is meant to be used instead of the `jupyter-book` commands. It is conventionally used in an identical way: + +``` +teachbooks build book +``` + +## List of Features + +Items in the list here are currently implemented in the TeachBooks package and described on other pages of this manual: +- Draft-Release Workflow: read more here +- External Contents: +- Local Server: + +The package is also set up to handle [APA references](./apa) when using the Draft-Release Workflow (the `_ext` subdirectory and its contents are manually copied during the pre-build phase). This will not be necessary once the APA Reference feature is turned into a proper Sphinx extension or Pybtext plugin. \ No newline at end of file