From 91db141529e9bb1948b547c0c3c4e4990cfde2d2 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Mon, 15 Apr 2024 14:41:39 +0200 Subject: [PATCH] update --- book/_config.yml | 5 +++-- book/basic-features/hypothesis.md | 33 +++++++++++++++++++++---------- book/workflows/publish.md | 1 + 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/book/_config.yml b/book/_config.yml index 6968c06..a568a72 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -22,7 +22,8 @@ sphinx: thebe_config: use_thebe_lite: true exclude_patterns: ["**/_*.yml", "**/*.md", "**/*.ipynb"] - +# START DRAFT html: comments: - hypothesis: true \ No newline at end of file + hypothesis: true +# END DRAFT \ No newline at end of file diff --git a/book/basic-features/hypothesis.md b/book/basic-features/hypothesis.md index b5edb33..941c6a7 100644 --- a/book/basic-features/hypothesis.md +++ b/book/basic-features/hypothesis.md @@ -2,15 +2,6 @@ Hypothesis is a third-party application that allows anyone to make publicly visible comments on a website (once you create a free account). This section explains how to use and install the extension; an alternative is Utterances, but this is only available for GitHub-hosted books. -## Using Hypothesis - -In this case it is easier to learn by doing! Hypothesis has been enabled for this book: if you look at the top right of the page, you will see three icons, an arrow, an eye and a note-pad. Clicking on the arrow will open the extension and allow you to view the annotations. Create an account and log in if you would like to reply or make your own annotations. You can also highlight text, but this is not publicly visible, it is only for your own reference. - -Note that the annotations are only visible for the page that you are currently viewing. You can see all the Annotations on a website by opening the "Public" menu at the top of the dialog pane, selecting "Public" again in the drop-down, then "View group activity." Make sure you type in the URL to search (e.g., `teachbooks.tudelft.nl/jupyter-book-manual`). - -% THIS IS ADDED TO PAGE AS ANNOTATION: -% This is an example Annotation. Note that annotations are publicly visible, but you must create an account and be logged in to reply or make your own. You can make highlights, but they are only visible to you, not everyone. You can also see all the Annotations on a website by opening the "Public" menu at the top of this dialog pane, selecting "Public" again in the drop-down, then "View group activity." Make sure you type in the URL to search (e.g., `teachbooks.tudelft.nl/jupyter-book-manual`). - ```{admonition} Be careful of changing website URL's! :class: warning @@ -27,9 +18,31 @@ html: comments: hypothesis: true ``` +## Using Hypothesis + +In this case it is easier to learn by doing! Hypothesis has been enabled for this book, but only in the _draft_ version. + +````{admonition} How to View the Draft Site +:class: tip, dropdown +You can access the draft version by adding `draft/` at the end of the main book (but before the current page). For example: + +``` +https://teachbooks.tudelft.nl/jupyter-book-manual/**draft/**basic-features/hypothesis.html +``` + +You can find out more about the draft and publish feature on {ref}`this page `. +```` + +Once on the draft version of this page, look at the top right corner: you will see three icons, an arrow, an eye and a note-pad. Clicking on the arrow will open the extension and allow you to view the annotations. Create an account and log in if you would like to reply or make your own annotations. You can also highlight text, but this is not publicly visible, it is only for your own reference. + +Note that the annotations are only visible for the page that you are currently viewing. You can see all the Annotations on a website by opening the "Public" menu at the top of the dialog pane, selecting "Public" again in the drop-down, then "View group activity." Make sure you type in the URL to search (e.g., `teachbooks.tudelft.nl/jupyter-book-manual`). + +% THIS IS ADDED TO PAGE AS ANNOTATION: +% This is an example Annotation. Note that annotations are publicly visible, but you must create an account and be logged in to reply or make your own. You can make highlights, but they are only visible to you, not everyone. You can also see all the Annotations on a website by opening the "Public" menu at the top of this dialog pane, selecting "Public" again in the drop-down, then "View group activity." Make sure you type in the URL to search (e.g., `teachbooks.tudelft.nl/jupyter-book-manual`). + ```{admonition} Tips :class: tip -- use {ref}`remove_from_publish` to enable in Draft book only +- use the {ref}`remove_from_publish` feature to enable Hypothesis in the draft book only ``` \ No newline at end of file diff --git a/book/workflows/publish.md b/book/workflows/publish.md index 9c29983..99d7c71 100644 --- a/book/workflows/publish.md +++ b/book/workflows/publish.md @@ -1,3 +1,4 @@ +(publish_students)= # Publish to students For this step it is assumed you’re using TeachBook’s GitHub actions or TeachBook’s GitLab pipeline.