diff --git a/content/gh_workflow.md b/content/gh_workflow.md index 90bc2c4c..046e9080 100644 --- a/content/gh_workflow.md +++ b/content/gh_workflow.md @@ -25,7 +25,7 @@ --- -## Exercise - Deploy Sphinx documentation to GitHub Pages +## Demonstration - Deploy Sphinx documentation to GitHub Pages ````{exercise} GH-Pages-1: Deploy Sphinx documentation to GitHub Pages In this exercise we will create an example repository on GitHub and @@ -95,7 +95,24 @@ jobs: - Commit some changes to your documentation - Verify that the documentation website refreshes after your changes (can take few seconds or a minute) ```` - +## Exercise - Sphinx documentation on GitHub Pages +````{exercise} GH-Pages-2: Deploy Sphinx documentation to GitHub Pages +1. Follow the above instructions to create a new repository with a Sphinx documentation project; +2. Try adding one or more of the following to your Sphinx project: + a. API documentation (see [previous exercise](#api-exercise) on API references) + b. a Jupyter notebook (see [previous exercise](#jupyter-exercise) on Jupyter notebooks) + c. change the theme (see the end of [the quickstart](#quickstart)) + + ```{important} + The computer on which the GitHub actions run is *not* your local machine, + and might not have the libraries you need to build the project. + Make sure you update the dependencies (installed with `pip` in the demonstration) appropriately. + ``` + ```{important} + Make sure the correct file paths are used where appropriate. + ``` +What do you need to change in the workflow file? +```` ## Alternatives to GitHub Pages diff --git a/content/sphinx.md b/content/sphinx.md index 9cef5c4c..8af3d135 100644 --- a/content/sphinx.md +++ b/content/sphinx.md @@ -66,7 +66,7 @@ But please don't give up if you don't have these - the episodes after this one w tools. ```` - +(quickstart)= ## Exercise: Sphinx quickstart ````{exercise} Sphinx-1: Generate the basic documentation template @@ -328,7 +328,7 @@ extensions = ['myst_parser', 'sphinx.ext.mathjax'] ````` - +(api-exercise)= ## Exercise: Sphinx autodoc `````{exercise} Sphinx-3: Auto-generating documentation from Python docstrings @@ -369,7 +369,7 @@ If you already have extensions from another exercise, just add `"autodoc2"` to t 5. Re-build the documentation and check the "API reference" section. ````` - +(jupyter-exercise)= ## Exercise: Using Jupyter with Sphinx `````{exercise} Sphinx-4: Writing Sphinx content with Jupyter