question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow content that is not in a subdirectory of the book

See original GitHub issue

I would like to organize my project like this:

TopLevelOfRepo
    mybookname
        _toc.yml
    notebooks
        chap00.ipynb

In _toc.yml, I expected to be able to write

- file: ../notebooks/chap00

But that doesn’t work – it says it can’t find chap00.ipynb.

Is there a reason for this restriction? Or am I doing something wrong?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
AllenDowneycommented, May 20, 2021

@redelmann Since opening this issue, I have found that I actually prefer to copy files from other directories into my jupyter-book build directory. In some cases I have to change file names; in other cases I run scripts to make changes in the notebooks themselves. And it helps me keep versioning straight. Not sure if this helps with your use-case, though.

1reaction
choldgrafcommented, Sep 15, 2020

Just a quick note on cluttering up the repository. @AllenDowney you mentioned that Jupyter Book will create a lot of extra files - just a note that these will all be in a _build folder, and generally speaking you wouldn’t include that folder with your github repo anyway (usually folks set up a github action to auto-deploy the repo to a website or something, see here for some ideas).

That means your repository on github could just look like

page1.ipynb
page2.md
...
_config.yml
_toc.yml

and when you build the book, it would create a _build folder that you wouldn’t need to check into git. That’s the only folder that Jupyter Book will generate. (this is different from what Jupyter Book used to do, which included all of the files for a Jekyll website in the root of the repo, but it now uses Sphinx so we don’t have to do that anymore 😃 )

Just wanted to clarify that in case it wasn’t clear!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I put Bookdown chapters in a subdirectory?
I can't figure put how to make a book with Rmd files in a subdirectory. Here's my current directory structure: myProject.Rproj; index.
Read more >
8.5. Controlling the Contents of an Assembly - Sonatype Help
Since a directories' execute permission is what allows users to list their contents, we want to make sure directories are executable in addition...
Read more >
Subdirectory Setup - BookStack
First, You will need to choose a folder to install BookStack into. This should be a separate directory from where your main website...
Read more >
Keep Subdirectory Structure in Dockerfile Copy | Baeldung
Let's understand the content line by line: the first line states that we're using the latest ubuntu image as our base image; the...
Read more >
You can change permissions for all files in a directory. - O'Reilly
This command gives the owner read/write permissions for the file called who. out. The letter u represents the owner (user), and +rw adds...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found