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

Ability to render TOC in type page #4082

Merged
merged 5 commits into from
Jan 28, 2025

Conversation

hichemfantar
Copy link
Contributor

@hichemfantar hichemfantar commented Jan 27, 2025

Why:

this pr gives the user more control and adheres to user expectation.
implicit, undocumented, and no workaround behavior like this should be avoided.

Closes: #4081
Closes: #4030

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

http://localhost:3000/about

before
image

after
image

docusaurus allows rendering toc on regular pages which is useful and i need this
image

I realize this changes previous behavior but this is needed and it's best to do it now while v4 is new and very few people are using it.

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

vercel bot commented Jan 27, 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 28, 2025 10:18am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
nextra ⬜️ Ignored (Inspect) Visit Preview Jan 28, 2025 10:18am

Copy link

vercel bot commented Jan 27, 2025

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

A member of the Team first needs to authorize it.

Copy link

changeset-bot bot commented Jan 27, 2025

🦋 Changeset detected

Latest commit: cc29e39

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

@hichemfantar hichemfantar changed the title Render TOC in type page Ability to render TOC in type page Jan 27, 2025
Copy link
Collaborator

@dimaMachina dimaMachina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok with this change, but I don't see the reason to make configurable breadcrumb, since it's navigation, and for single page it doesn't make sense

@dimaMachina dimaMachina merged commit 2ba45de into shuding:main Jan 28, 2025
5 of 9 checks passed
@hichemfantar hichemfantar deleted the enable-toc-in-type='page' branch January 28, 2025 11:05
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.

ability to enable toc and breadcrumb in type="page" How do i add table of contents in a regular page?
2 participants