-
Notifications
You must be signed in to change notification settings - Fork 65
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
support for glob:
in the TOC
#1228
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Hi @parmentelat, thanks for your report! We're actually in the process (c.f. #1188) of implementing a new TOC structure in MyST. I'm glad that you observe the need for content-less sections; that's a limitation posed by the existing Sphinx-derived Jupyter Book TOC. Once #1188 lands, it will be possible to define a table of contents in your |
Hi @agoose77 however I'd like to stress that my initial motivation is to a large extent orthogonal to this new track, I was more outlining a steep step in the migration process for those who have a large number of |
@parmentelat the new TOC is related to this: we will focus our efforts on a migration from JB to MyST (or JB 2, see https://executablebooks.org/en/latest/blog/2024-05-20-jupyter-book-myst/). We do still plan to support |
thanks for your feedback, looking forward to his insights |
Just a quick question: I thought that the new TOC work does support glob-like patterns, e.g. so yo ucould do:
It seemed there was blob-like logic in the PR: Am I wrong there? |
@choldgraf yes, we support a |
Ah - so in that case, @parmentelat's concern here:
Is actually resolved by: This functionality is in mystmd, it just doesn't require the |
It occurred to me after reading your comment that I never surfaced that implicit point! Yes, MyST-MD is about to get glob support in its internal TOC. My feeling is that we deprecate the |
thanks @agoose77 and @choldgraf for spelling it out, this implicit thing had totally escaped me so far so let me try to summarize, so I can make sure I got it right
is that a fair description ? |
@parmentelat a working idea for JB 2 is:
Right now, it's |
hey @agoose77 you've lost me a bit though, when you said
this seems like a rather radical statement to me; for one thing, some people like developers, who used |
Kinds of "JB User"We're still working out the UX, so I'll start by saying this all might change! Practically speaking, the EB organisation services many different kinds of users:
The big distinction for me is whether Jupyter Book is the entry-point to their book, or whether it is used in terms of its components, i.e. is there a We originally built upon Sphinx because it was well-established as a documentation tool, which is why the components that comprise Jupyter Book are so well-suited to (1) developers writing API docs. However, after years of exploring the problem-space occupied by Sphinx, it has become clear that Sphinx is now a limiting factor both for users and developers. It follows that, as outlined in our blog post, we're building Jupyter Book 2 on top of MyST-MD instead of Sphinx. For users, we feel that MyST provides a better UX than Sphinx, and for developers, MyST-MD is built from the ground-up around scientific writing and technical communication with modern web-first principles. In order to make the separation between our Sphinx work and the new MyST-MD/Jupyter Book projects clearer, we plan to migrate the new MyST efforts to a Jupyter subproject Exploring JB on top of MySTWhen I write that
I should elaborate. Much of the existing
Anyone authoring PDFs, or wanting to add more functionality to their books ultimately has seen this leaky abstraction, and probably has a reasonable amount of Sphinx-specific (i.e. not Jupyter Book) configuration in their You could ask "why didn't you just use Sphinx directly?", and the answer is that it's complex; it's old, with a long history, and it does many things. It doesn't make for a very beginner/non-technical-user friendly tool as a result. We feel that MyST is a much simpler tool to use than Sphinx. Because it's a younger project, we've been able to take what we learned from Jupyter Book and apply it from the beginning. It's designed around rich scientific communication, so the features required to support that were added at its core. Unlike Sphinx, MyST is developed on GitHub with the hope that we'll continue to grow our contributor base according to the Executable Books / Jupyter principles.
Yes, this is true -- and something that we are very mindful of. In the long run, it might be possible that this won't hold true; the papyri project is working towards documentation IR generation that builds MyST AST as an output. But, baby steps! |
To make this clear: in the future, if you're running Jupyter Book >= 2.0, then Sphinx will no longer be available to you. MyST is an entirely different back-end with a different configuration structure. If you want to continue using Sphinx via Jupyter Book you'll need to pin to < 2.0 - the Sphinx extensions it uses may be maintained to some degree. As @agoose77 notes - there might be ways to incorporate more developer-focused workflows into the MyST engine (e.g. via papyri), though its initial focus will be on computational narratives rather than software documentation. |
right; so to make things clear, I am myself in the teachers category, and I totally agree that sphinx is not the right tool for me anyways, thanks for the discussion and all the insights, this is helpful :) |
Could you give more information on what you think is problematic about the name Myst? That would be helpful to think about |
oh; imho jupyter book hints at publishing; markdown myst refers to a markup language, that people can easily assimilate to quick and not-too-powerful replacement for html - think whats'app or github or social media.. so imho the second hints at "you can do simple stuff quickly but don't demand too much" (it took me more than a year to consider that mystjs, that in the meanwhile had become mystmd, could maybe indeed be a modern publishing system ;) |
That's a really helpful insight. Do you have thoughts on how we can balance the "brands" of the two projects? I think we do want to keep the jupyter book brand clear, and focus it around the "multi document books and knowledge bases" usecases of Myst. Then myst can be a more flexible document engine (like sphinx) and jupyter book builds on top of it for a specific use case . |
mmh, well, I'm clearly reaching the borders of my comfort zone here :) I understand the need to leverage on the 'jupyter book' success story so far
triggered my reaction because, as far as I can tell right now - and please show me wrong :) - there is going to be, at least in the short-to-mid term, substantial differences in both tools capabilities; particularly with respect to using various sphinx extensions IIUC; I have not a clear view of the boundaries here, but it seems to me that the differences are big enough (and may remain so over time) that you need IMHO to propose an opt-in mechanism, if only to preserve a minimal amount of backwards compatibility so here's a few brain dump ideas of how you could consider "rebranding" the new stack my $0.02, obviously.. regardless, this is all very exciting, so thanks a lot again for all the work and the awesome tools, I can't wait to see where this all goes :) |
Thanks for this @parmentelat ! Would it be acceptable to recommend people just use |
I take it you mean well from a purely selfish perspective, it'd be kind of workable, given that I'm the only one who'd need to mess with that (as opposed to, having to instruct my students, that'd be another business entirely ;-) but from a more general standpoint, I could understand if some people were to find that a bit harsh... |
Totally agree - I think it is critical both to help people downgrade if they want w helpful messages, and to upgrade as easily as possible. What would be your wishlist of functionality you'd want to see with the myst engine that seems to be only possible with Sphinx right now? |
ok, since you're asking, here are the big showstppers that I see at this point
I have also tried to make a tour of the features that I need - not an easy task - and could probably give more details on a few things that stick out; at first glance:
so well, I guess I'm going to have to wait a little longer before I can dive and try to migrate a sample course book for real :-) |
but wait, it feels like I'm missing something big here; I am only now realizing that my notebooks - which are jupytext-saved - are being treated as text, and simply not being run at all... which accounts for the note on |
@parmentelat thanks for this feedback - I've taken the liberty of editing your comment to link the respective issues tracking each of these things (and opened a new one for Jupytext #1245, could you provide any additional information in that issue?). I hope that was OK!
Could you go into more detail on this? I'm not sure I understand. |
This issue itself can be closed :) |
Proposal
Hi community !
I am a long time jupyter-book user; I wish to take this opportunity to say how grateful I am for this wonderful tool :)
One thing I am struggling with though is the TOC structure, that iiuc was mostly inherited from sphinx; in any case I still do feel a little awkward about that, like I believe quite a few other users do, if I judge from various opinions that I've read here and there ;)
For this reason mostly, I am currently giving a shot at mystmd as a possible replacement, targetting ideally the beginning of next semester, end of august;
with as primary objective the ability to define a more natural global toc, esp. more freely define collapsible areas and content-less labels
as a first step I just ran myst in a jb repo as-is, and have immediately run into the lack of support for
glob:
entries in_toc.yml
although I can work around that by manually expansing my globs, it is my feeling that native support for such entries by
mystmd
would greatly help other users who follow a similar path (in particular, I also ran into that when using the online tool that converts a github repo, sorry I can't find that url again at the moment...)also, I am just digging into this project for the first time, but have noticed you have recently decided to go for your own toc-definition format, and in this respect I thought it might be valuable to take this into account at an early stage ?
Additional notes
The text was updated successfully, but these errors were encountered: