Improve title snipping in notebooks for revealjs#8016
Conversation
| // if we have front matter and a title then we are done | ||
| yaml?.title || | ||
| // if we have front matter and it has revealjs as a format then we are done too | ||
| (yaml?.format !== null && |
There was a problem hiding this comment.
I think the idea of this is that a python user with existing notebooks may want to render them using quarto render foo.ipynb --to html or similar commands and get a reasonable experience. Since it is common to place a heading as the 'title' of the notebook in a markdown cell at the top of the notebook, we're trying to find the best way to promote that to the document title in Quarto.
It's pretty tempting to just that if the user creates front matter at all, they should place a title there (not just for revealJS - just that once they're making front matter we expect them to handle the title)...
We could start with this if you're feeling conservative.
There was a problem hiding this comment.
The revealjs specific case is that
- Using
titlewill trigger the use of a specifictitle-slidesectionf from the revealjs template - To opt out this title slide from the template, no providing
titlein YAML is for now the way to go.
Currently it seems you can't do that with engine: jupyter, or at least that we promote headers like ## without considering the slide-level, meaning that a non section slide could be promoted to section slide.
This is something quite specific to revealjs here related to this heading promoting feature. 🤔
|
BY the way the |
|
OK so it seems this is more complex that it seems. This I am even not sure that the new addition in 24672a4 about not stripping header if content before heading ( I'll leave this as draft for further work together on this, and open smaller PR for immediate issues found |
9f0c42f to
42cd1a8
Compare
Don't perform notebook title fixup with `format: revealjs` as this would create a new undesired title slide. Follow up on 24672a4
73083f5 to
962c77e
Compare
|
Not sure why,but it does not seem to be needed anymore. Initial issue #8012 is no more reproducible. So I am closing this. |
fixes #8012
Doing a title snipping when
engine: jupyteris a bit too much forrevealjsformat because this will create a new title slide whereas when notitleis provided, it should be considered custom first slide per our doc: https://quarto.org/docs/presentations/revealjs/index.html#title-slideSo I suggest we do not strip in Revealjs format.
Just asking for review because I don't fully understand why we do this stripping.
Does it sounds good ?
We also use the function for stripping at
quarto-cli/src/core/pandoc/pandoc-partition.ts
Lines 49 to 58 in 9f0c42f
So I need to check if we need also some support there... 🤔
it seems used for special cases like embed feature and some unused function