-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Table of Contents is too long maybe make it a collapsible section #273
Comments
The table of contents is helpful to see all the questions at the same time. If we close it by default, reader may not get idea to expand them. |
In Markdown, you can create collapsible sections like the one you've shown
using HTML <details> and <summary> elements, just as you've demonstrated in
your example. Here's how to do it:
1.
Use <details> and <summary>: These HTML elements are used to define the
collapsible section. The <summary> element is the clickable header that
users will click on to expand or collapse the content.
2.
Place your content inside the <details> element: You can include any
Markdown content, such as headings, lists, code blocks, or paragraphs,
within the <details> element. This content will be hidden by default
when the section is collapsed.
3.
Keep the <summary> element concise: The <summary> element should provide
a brief and meaningful label for the collapsible section. Users will click
on this label to toggle the visibility of the content.
4.
Use indentation: While it's not required, indenting the content within
the <details> element helps improve readability and maintainability,
especially for larger sections of content.
5.
Use backticks for code blocks: If you want to include code blocks, as
you did in your example, use triple backticks (```) to define the code
block and specify the language (e.g., js for JavaScript).
Remember that the support for HTML in Markdown may vary depending on the
platform or renderer you're using. Most Markdown renderers should support
<details> and <summary>, but it's a good idea to test your Markdown
documents in the specific environment where you intend to use them to
ensure proper rendering and interactivity.
…On Tue, Oct 3, 2023 at 8:24 PM Sahil bakoru ***@***.***> wrote:
Closed #273
<#273> as
completed.
—
Reply to this email directly, view it on GitHub
<#273 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A7GHGHU5MC4S3ZU4BXJXGALX5QRKRAVCNFSM6AAAAAA5KZPOAGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQGUZTSNRRGIZDCOA>
.
You are receiving this because you are subscribed to this thread.Message
ID:
<sudheerj/reactjs-interview-questions/issue/273/issue_event/10539612218@
github.com>
|
chat GPT is that you ? |
Ok i will send you tomorrow
…On Tue, 3 Oct, 2023, 10:43 pm Sahil bakoru , ***@***.***> wrote:
Reopened #273
<#273>.
—
Reply to this email directly, view it on GitHub
<#273 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A7GHGHXBP5UPOC4X27VT6S3X5RBU7AVCNFSM6AAAAAA5KZPOAGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQGU2DCMRRGM3TGMA>
.
You are receiving this because you commented.Message ID:
<sudheerj/reactjs-interview-questions/issue/273/issue_event/10541213730@
github.com>
|
I have made a pull request for that, video and code is also there.check the pull request : #274 |
@sahilbakoru Thanks added |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Table of Contents is too long maybe make it a collapsible section .
Just like shown below.
Screen.Recording.2023-09-28.at.4.48.33.PM.mov
Above video from this gist : https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab#how-to-add-a-collapsible-section-in-markdown
The text was updated successfully, but these errors were encountered: