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

[2.x] Add conditional semantic documentation article rendering #1566

Merged

Conversation

caendesilva
Copy link
Member

This is the most elegant solution I have been able to come up with for reusing the base documentation layout for search pages.

Before this change, the following empty HTML is added to the full page search page:

<header id="document-header" class="flex items-center flex-wrap justify-between prose-h1:mb-3">

</header>
<section id="document-main-content" itemprop="articleBody">

</section>
<footer id="document-footer" class="flex items-center flex-wrap mt-8 prose-p:my-3 justify-between text-[90%]">

</footer>

This is of course not very semantic. But now, we can set the article to false, and this won't render.

Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d764907) 99.95% compared to head (580c69e) 99.95%.

❗ Current head 580c69e differs from pull request most recent head 886c9c6. Consider uploading reports for the commit 886c9c6 to get more accurate results

Additional details and impacted files
@@              Coverage Diff              @@
##             2.x-dev    #1566      +/-   ##
=============================================
- Coverage      99.95%   99.95%   -0.01%     
+ Complexity      3504     1751    -1753     
=============================================
  Files            362      181     -181     
  Lines           9466     4731    -4735     
=============================================
- Hits            9462     4729    -4733     
+ Misses             4        2       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@caendesilva caendesilva marked this pull request as ready for review February 13, 2024 14:20
@caendesilva caendesilva force-pushed the conditional-semantic-documentation-article-rendering branch from 580c69e to 886c9c6 Compare February 13, 2024 14:22
@caendesilva caendesilva merged commit 7282990 into 2.x-dev Feb 13, 2024
6 checks passed
@caendesilva caendesilva deleted the conditional-semantic-documentation-article-rendering branch February 13, 2024 14:23
@caendesilva caendesilva mentioned this pull request Feb 13, 2024
99 tasks
@caendesilva caendesilva added this to the v2 milestone Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant