Made it TU Delft specific

This commit is contained in:
Tom van Woudenberg 2025-01-13 17:35:47 +01:00
parent 060cd74e6a
commit 1da4cf05c4
16 changed files with 50 additions and 183 deletions

View file

@ -1,5 +1,5 @@
Title: TeachBooks template
author: TeachBooks Team, built with <a href="https://teachbooks.io">TeachBooks</a> and <a href="https://jupyterbook.org/">Jupyter Book</a>, <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer"">CC BY 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt=""></a> #add your own name here
Title: TU Delft OIT GitHub Template
author: Author from Delft University of Technology, built with <a href="https://teachbooks.io">TeachBooks</a> and <a href="https://jupyterbook.org/">Jupyter Book</a>, <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer"">CC BY 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt=""></a> #add your own name here
execute:
execute_notebooks: "off"
@ -8,7 +8,7 @@ only_build_toc_files: true
html:
favicon : "figures/TB_favicon.ico"
baseurl : "https://teachbooks.io/" #Replace this with your own URL
baseurl : "https://oit.tudelft.nl/" #Replace this with your own URL
sphinx:
config:
@ -19,10 +19,8 @@ sphinx:
exclude_patterns: ["**/_*.yml", "**/*.md", "**/*.ipynb"]
html_theme_options:
logo:
text: Template
image_light: TeachBooks_logo.svg # Put your logo for the light mode here (can be the same as image_dark)
image_dark: TeachBooks_logo_inverted.svg # Put your logo for the dark mode here (can be the same as image_light)
repository_url: "https://github.com/user/repo" #add your own repo URL here
text: TU Delft GitHub OIT Template
repository_url: "https://github.com/TUDelft-books/repo" #add your own repo URL here
path_to_docs: "book"
repository_branch: "main"
use_edit_page_button: true
@ -43,6 +41,8 @@ sphinx:
- download_link_replacer
- sphinx.ext.extlinks
- sphinx_image_inverter
- sphinx_exercise
- sphinx_tudelft_theme
bibtex_bibfiles:
- references.bib

View file

@ -3,11 +3,11 @@
You can refer to this book as:
> `<editors>` (`<year>`) _`<title>`_. `<url to book website>`. Source files at `<link to github repo`
> `<editors>` from Delft University of Technology (`<year>`) _`<title>`_. `<url to book website>`. Source files at `<link to github repo`
You can refer to individual chapters or pages within this book as:
> `<Title of Chapter or Page>`. In `<editors>` (`<year>`) _`<title>`_. `<url to specific page on bbook website>`. Source files at `<link to specific commit / file in github repo`
> `<Title of Chapter or Page>`. In `<editors>` from Delft University of Technology (`<year>`) _`<title>`_. `<url to specific page on bbook website>`. Source files at `<link to specific commit / file in github repo`
We anticipate that the content of this book will change significantly. Therefore, we recommend using the source code directly with the citation above that refers to the GitHub repository and lists the date and name of the file. Although content will be added over time, chapter titles and URL's in this book are expected to remain relatively static. However, we make no guarantee, so if it is important for you to reference a specific location/commit within the book.

View file

@ -1,5 +1,7 @@
# Exercises
> This page reuses CC BY 4.0 licensed content from {cite:t}`template`. {fa}`quote-left`{ref}`Find out more here.<external_resources>`
Getting used to the syntax of writing in a Jupyter Book can be a bit daunting at the start, not to mention becoming familiar with the various tools and workflows required. To help make the learning curve somewhat easier to travel, a number of exercises have been prepared for you as part. The exercises are designed such that no prior experience with any tools or programming is required, as long as you have read the preceding introductory pages.
```{exercise}

View file

@ -1,10 +1,12 @@
# Exercise 1: First file edit
> This page reuses CC BY 4.0 licensed content from {cite:t}`template`. {fa}`quote-left`{ref}`Find out more here.<external_resources>`
Let's start with the most basic edit: add some text to a file and see that the website is updated.
> Can you add some content to the intro page?
1. Go to the the file `book/intro.md` on your GitHub repository (`https://github.com/<your_username>/<your_repo_name>`) - {octicon}`code;1em` `Code` - `Book` - `intro.md` - {octicon}`pencil;1em` `Edit this file`
1. Go to the the file `book/intro.md` on your GitHub repository (`https://github.com/<your_username>/<your_repo_name>` or `https://github.com/TUDelft-books/<your_repo_name>`) - {octicon}`code;1em` `Code` - `Book` - `intro.md` - {octicon}`pencil;1em` `Edit this file`
2. Add some text. Feeling brave? Have a look at the [MyST cheat sheet](https://jupyterbook.org/en/stable/reference/cheatsheet.html). Don't worry if that feels daunting, there will be exercises on this!
3. Click `Commit changes`
4. Add a message and description of your change. With this `commit` you save your changes to the git-timeline. Any commit can always be reverted. Therefore, it's useful to shortly explain what is included in your commit. Later on, you'll make commits which may contain changes to many different files. In that case, a descriptive commit message and description is even more useful!

View file

@ -1,5 +1,7 @@
# Exercise 2: Add a new file to the table of contents
> This page reuses CC BY 4.0 licensed content from {cite:t}`template`. {fa}`quote-left`{ref}`Find out more here.<external_resources>`
Let's continue by adding one additional step. Let's add a file to the table of contents! the `_toc.yml` contains a list of all the files to be shown in your book-website. Let's add a file which is not in the table of contents yet!
> Can you add the file named `file_to_be_added_to_toc.md` to the book website?

View file

@ -1,5 +1,7 @@
# Exercise 3: Change book configuration
> This page reuses CC BY 4.0 licensed content from {cite:t}`template`. {fa}`quote-left`{ref}`Find out more here.<external_resources>`
As we've added some content by now, let's make this book a bit more personal! We'll make some changes to the `_config.yml` file which changes the configuration of the book website.
> Can you edit the repository url defined in the `_config.yml`, change the title shown below the logo and change the author as shown in the footer?

View file

@ -1,5 +1,7 @@
# Exercise 4: _Your_ Version of the Book
> This page reuses CC BY 4.0 licensed content from {cite:t}`template`. {fa}`quote-left`{ref}`Find out more here.<external_resources>`
By now, we've covered the essentials: content files, `_toc.yml` and `_config.yml`. But what if you want to make some changes but don't want to share them directly with the general public of your book website? Or what if you have some work-in-progress that you want to share with colleagues? You need a version of your book! Let's try and do that! Later on, you'll probably want to merge your newest version back into the original book. That's what we'll do in [](./005.md).
> Can you make a new branch of your book with an additional file `file_on_new_version.md` and view it online?

View file

@ -1,5 +1,7 @@
# Exercise 5: Merge your version in the original book
> This page reuses CC BY 4.0 licensed content from {cite:t}`template`. {fa}`quote-left`{ref}`Find out more here.<external_resources>`
In [](./004.md) you created your own version of a book. But it would be a pity if you never contribute back to the original book right? Probably your additions are very useful there too! You'll merge you version of the book which is stored on a branch into the original book which is on main. If there've been some changes on that main branch in the meantime, git will take care of that!
> Can you merge your branch into `main` with a pull request?

View file

@ -1,5 +1,7 @@
# Exercise 6: Contribute to the book of somebody else
> This page reuses CC BY 4.0 licensed content from {cite:t}`template`. {fa}`quote-left`{ref}`Find out more here.<external_resources>`
```{tip}
For this exercise you will need a partner, as well as your own book. In the first part, each of you will make a change in the book of the other, then request the other to review and merge the change. In the second part, you will go back to your book and accept the change made by your partner.
```

View file

@ -1,5 +1,7 @@
# Summary of exercises: All Exercises
> This page reuses CC BY 4.0 licensed content from {cite:t}`template`. {fa}`quote-left`{ref}`Find out more here.<external_resources>`
With the exercises, you did all the steps of our TeachBooks workflow!
```{figure} ../figures/TeachBooks_flowchart.svg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 158 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 368 KiB

View file

@ -3,4 +3,12 @@
author={Moore, Jason},
howpublished={\url{https://moorepants.github.io/learn-multibody-dynamics/sympy.html}},
year={2023}
}
@misc{template,
author = {{TeachBooks}},
title = {Your first TeachBook using the GitHub template},
url = {https://github.com/TeachBooks/template},
year = {2024},
note = {Retrieved December, 2024. CC BY 4.0.}
}