-
Notifications
You must be signed in to change notification settings - Fork 651
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
[ENH] Add tag to cli for "only" content #1618
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## master #1618 +/- ##
==========================================
+ Coverage 91.30% 91.32% +0.02%
==========================================
Files 7 7
Lines 690 692 +2
==========================================
+ Hits 630 632 +2
Misses 60 60
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thanks for this contribution - I agree that this would be valuable and in general this looks good with the tests+docs! My one question is whether we want to special-case sphinx configuration like this, or instead make it possible for somebody to provide their own custom configuration to the |
Thanks for the comment. Forgive me for the following length. Being specific to get good guidance without trial & error PRs. TL/DR: what if NOTE updated to discuss changes to functions inside of Totally agree with the question of whether adding If Jupyter Book thinks it's useful to surface "tag manipulation" to the user, another approach is to work through The context is that the tags are set, added, and removed during initialization of a Sphinx object. Sphinx achieves this by executing Start with something easy: converting JB's A user could add/remove tags in
If those keys are kept in the dict returned by
That smells a little like a workaround. What I suggest is that the proposed keys (just noting, with the new
I suggest doing a similar trick as above: popping the tag-related tags from
|
Okay, I'll submit a different PR that work with the configuration yaml instead of the command line. Do you close this or do I? |
Simple addition to the cli to surface the sphinx "tag" command line option to build conditional content. Works like using
sphinx-build -t TAG <sourcedir>
with sphinx>=0.6 (see sphinx documentation of theopen
directive.This addresses issue #1290 (mistakenly refers to "open" directive). Possibly also #1425.
Multiple option allows for boolean TAG expression. For example
jupyter-book build <sourcedir> --tag cowboy --tag cowgirl
Is needed to build the following: