Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating to new version of the textbook #2

Closed
wants to merge 5 commits into from

Conversation

choldgraf
Copy link
Collaborator

@choldgraf choldgraf commented Jan 19, 2019

This is a mega-refresh of the site using the newest version of Jupyter Book (which has been upgraded quite a lot since this textbook originally used it). The diff is probably way too big to overview, but this shouldn't change the content of the book at all, only the surrounding layout / style / javascript / etc.

Here's a preview of what it looks like:

http://predictablynoisy.com/textbook-prob140

Once @a-adhikari , @dibyaghosh , or @dcroce thinks it looks OK (e.g. no link has unexpectedly broken etc) then we can merge.

(note that in the future, updates will be much less-painful...it's just that the prob140 textbook started using jupyter-book way back in its early days)

@dibyaghosh
Copy link
Contributor

Does this require that the _data/toc.yml file be manually updated? I can't seem to find a script that generates toc.yml

@choldgraf
Copy link
Collaborator Author

currently yeah, though I'm working on an auto-gen script for it. It seemed redundant to have SUMMARY.md that just created another structured text file, and you can include more information in yaml file (like adding section headers, etc)

@dibyaghosh
Copy link
Contributor

OK, so the auto-gen script is very crucial for us - I don't think we'll upgrade to the new version of the site until we get that working. I'm happy to contribute to making that script as well once the initial rush of setting the course up dies down (probably be free this weekend), but let's table the upgrade for now.

Also, definitely agreed that we had a lot of redundancies with SUMMARY.md and the yml file, because of our migration from Gitbooks to Jekyll. I'm glad that we've finally cleaned up those old relics.

@choldgraf
Copy link
Collaborator Author

Thanks for the input - could you explain to me how you are using the TOC auto-gen script? Is the main problem that it is too much work to change section numbers automatically? Or some other reason?

@dibyaghosh
Copy link
Contributor

dibyaghosh commented Jan 22, 2019

Section numbers and section titles are the major concerns: especially near the beginning of the semester, there will be some rearranging of sections, chapters, and renaming of section titles. Prof. A will be making most of these changes, and she told me that it would be difficult on her part to maintain a table of contents file that's accurate like this, especially with the initial hecticness of the semester.

@choldgraf
Copy link
Collaborator Author

So the new version of jupyter-book automatically adds section numbers to the sidebar (so you don't need to hard-code them in).

In this book's case, I've kept the numbers hard-coded in the titles because the textbook was numbering the sub-sections, but wasn't numbering the top-level sections (e.g. they start with Chapter 1: XXX not 1. Chapter 1: XXX. If the latter is fine w/ you, then it'd be really easy to number the sections automatically.

For example, I switched number_toc_chapters to "true" in this PR and removed the hard-coded section numbers. This is what it looks like:

http://predictablynoisy.com/textbook-prob140/Chapter_02/00_Calculating_Chances.html

@choldgraf
Copy link
Collaborator Author

closing this for #3

@choldgraf choldgraf closed this Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants