-
Notifications
You must be signed in to change notification settings - Fork 330
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
add title canonicalization html postprocessor #11224
Conversation
@cscheid This change broke our (somewhat fragile) post-processing of quarto vignettes in pkgdown. Your comment above suggests that the structure of quarto HTML output may change again. Do you anticipate further modifying the structure of the HTML output in an upcoming quarto release? If so, we'll hold off making changes on the pkgdown side until the format is settled in the next release. There are two specific things that impacted pkgdown post-processing:
|
This seems like an issue. HTML template as the field and it should be field with pagetitle which by default is supposed to be the same as title
I'll look into that, based on the pkgdown bug report. I am surprised that this change that seems to be targeted document without a |
@cderv We had been fetching the title from the meta block: here: then here: |
Oh I see. I misunderstood. Thanks for the clarification. 👀 |
Ok I did not understood this
In the output by the specific call to |
Ok so now I understand. Within pkgdown, the custom template is applying which leads to this in the HTML before Quarto postprocessing <div class="meta">
<h1>My cool title</h1>
</div> However, as the custom template does not use
and a title block will be created anyway by this new post-processing. The
and the h1 that pkgdown expect will be moved
So this PR has indeed bad side effect on custom pkgdown and custom template. I'll open a separate issue with those informations. |
@cderv your comment above suggests that we can just use the |
Are you looking for workaround until we fix this or a lasting solution for pkgdown side ? |
CRAN wants an updated pkgdown by Dec 24 to address this issue so a workaround would be fine for now. |
@cderv @jayhesselberth Thanks for tracking this down. Let's make sure we fix this very soon if possible (eg, the next couple of days). Let's also add a regression test that explicitly exercises the pkgdown vignette path. @jayhesselberth We aren't planning on major changes, but are likely to change the HTML structure over time. Nevertheless, the expectation is that we'll always document when we do. This specific issue interacts with the custom templates code paths in a subtle way, which is why it didn't come up during testing. |
Closes #10567.
This fixes the immediate bug, but the HTML emitted is still not exactly the same; we have a stray
section
tag on the document with an explicit# title
heading (or, we have a missingsection
tag on the document with atitle: title
declaration).