Skip to content
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

References: The section-desc class isn't being applied the description #2352

Closed
gadenbuie opened this issue Oct 17, 2023 · 2 comments · Fixed by #2446
Closed

References: The section-desc class isn't being applied the description #2352

gadenbuie opened this issue Oct 17, 2023 · 2 comments · Fixed by #2446
Labels
bug an unexpected problem or unintended behavior front end 🌷 General HTML, CSS, and JS issues reference 📚
Milestone

Comments

@gadenbuie
Copy link
Contributor

Using pkgdown's own site for a reprex, the Build section of the reference index includes a description:

reference:
- title: Build
  desc:  Build a complete site or one of its components.

But in the rendered HTML, the section-desc class is being applied to an empty <p> tag, rather than the description.

<div class="section level2">
  <h2 id="build">Build<a class="anchor" aria-label="anchor" href="#build"></a></h2>
  <p class="section-desc"></p>
  <p>Build a complete site or one of its components.</p>
</div>
@hadley hadley added bug an unexpected problem or unintended behavior reference 📚 front end 🌷 General HTML, CSS, and JS issues labels Oct 30, 2023
@hadley
Copy link
Member

hadley commented Apr 12, 2024

I'm guessing that this is the same root cause as #2381, i.e. we're using markdown_text_block() and then inserting into the template, and the xml2 roundtrip flattens out the extra wrapping <p>.

I think we want to allow authors to supply (e.g.) bulleted lists or multiple paragraphs, so that suggests we should change the <p> in the template to a <div>. Would that work for you @gadenbuie?

@hadley hadley added this to the 2.1.0 milestone Apr 12, 2024
@gadenbuie
Copy link
Contributor Author

I think we want to allow authors to supply (e.g.) bulleted lists or multiple paragraphs, so that suggests we should change the <p> in the template to a <div>. Would that work for you @gadenbuie?

That would, thank you!

hadley added a commit that referenced this issue Apr 16, 2024
@hadley hadley modified the milestones: 2.1.0, 2.0.9 Apr 16, 2024
@hadley hadley closed this as completed in 97d7abf Apr 16, 2024
SebKrantz pushed a commit to SebKrantz/pkgdown that referenced this issue Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior front end 🌷 General HTML, CSS, and JS issues reference 📚
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants