Skip to content

allow configuring the path of the contents directory - #346

Open
keewis wants to merge 3 commits into
jupyterlite:mainfrom
keewis:contents-dir
Open

allow configuring the path of the contents directory#346
keewis wants to merge 3 commits into
jupyterlite:mainfrom
keewis:contents-dir

Conversation

@keewis

@keewis keewis commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

This is the one remaining issue I have before being able to merge the PR that adds try_examples to the xarray docs.

Basically, I would run sphinx once and then retry again after making changes, and if the first run exited with a non-zero exit code the second run would try to execute all the notebooks in the _contents directory. However, if I were to add _contents to exclude_patterns jupyterlite wouldn't be able to find the notebooks in _contents.

As far as I can tell, changing the path from _contents to _build/contents (or _build/jupyterlite-contents) would always succeed, and wouldn't get confused by exclude_patterns. So what I did was:

  1. make the path configurable
  2. clean up before the next run instead of after the current run

cc @agriyakhetarpal

keewis and others added 3 commits July 28, 2026 14:56
This will make sure that timing problems will never arise, and if the
contents are at `_build/contents` (or rather,
`_build/jupyterlite-contents`) cleaning up after the end of the process
is not really required.
@keewis

keewis commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

reading the configuration docs, what contents refers to is quite confusing... on main there's jupyterlite_contents and jupyterlite_ignore_contents, as well as the hard-coded CONTENT_DIR that possibly is only used for try_examples? If so, I might rename the setting to try_examples_content_dir (or jupyterlite_try_examples_content_dir, not sure).

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.

1 participant