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

Update TOC to render correctly on type=page #4111

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

hichemfantar
Copy link
Contributor

@hichemfantar hichemfantar commented Jan 29, 2025

Why:

Closes: #4110

What's being changed (if available, include any code snippets, screenshots, or gifs):

Revise the rendering logic of the Table of Contents to consider theme configuration and the active type, ensuring proper display based on these conditions.

Check off the following:

  • I have reviewed my changes in staging, available via the View
    deployment
    link in this PR's timeline (this link will be available after
    opening the PR).

Copy link

changeset-bot bot commented Jan 29, 2025

🦋 Changeset detected

Latest commit: 1374dae

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
nextra-theme-docs Patch
nextra Patch
nextra-theme-blog Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextra-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 10:37pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
nextra ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 10:37pm

Copy link

vercel bot commented Jan 29, 2025

@hichemfantar is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@hichemfantar hichemfantar changed the title Update TOC rendering logic based on theme configuration and active type Update TOC to render correctly on type page Jan 29, 2025
@hichemfantar hichemfantar changed the title Update TOC to render correctly on type page Update TOC to render correctly on type=page Jan 29, 2025
@hichemfantar hichemfantar marked this pull request as draft January 29, 2025 21:07
@hichemfantar hichemfantar marked this pull request as ready for review January 29, 2025 21:10
@hichemfantar
Copy link
Contributor Author

@dimaMachina i think eslint is incorrectly reporting the condition as always truthy?

@hichemfantar
Copy link
Contributor Author

nvm i fixed it

@dimaMachina dimaMachina merged commit 5c51b49 into shuding:main Jan 30, 2025
5 of 9 checks passed
@hichemfantar hichemfantar deleted the render-toc-on-page-correctly branch January 30, 2025 23:57
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.

the toc can no longer be accessed if toc float is globally set to false and toc is enabled in type="page"
2 participants