-
Notifications
You must be signed in to change notification settings - Fork 5k
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
feat: add /docs/header-ids.md
#12443
Conversation
WalkthroughThis update introduces documentation for utilizing custom header IDs in markdown documents within the Ethereum project. It provides a comprehensive guide on how to assign and use these IDs for linking to specific sections, ensuring consistent anchor links across translations and aiding in the calculation of translation statuses. Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 5
Configuration used: CodeRabbit UI
Files selected for processing (1)
- docs/header-ids.md (1 hunks)
Additional comments: 1
docs/header-ids.md (1)
- 53-53: This section might benefit from a slight clarification. It's important to note that while documents in
/docs
do not require custom header IDs for website display purposes, they might still benefit from them for internal documentation consistency and navigation.Consider clarifying the guidance on when custom header IDs are not needed to ensure there's no confusion about their utility in different contexts.
@@ -0,0 +1,53 @@ | |||
# Custom header IDs for markdown documents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the document title, "markdown" should be capitalized as "Markdown" to refer to the proper noun correctly.
- # Custom header IDs for markdown documents
+ # Custom header IDs for Markdown documents
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
# Custom header IDs for markdown documents | |
# Custom header IDs for Markdown documents |
@@ -0,0 +1,53 @@ | |||
# Custom header IDs for markdown documents | |||
|
|||
Html ID attributes are used to create links to specific sections of a document. In markdown, **custom header IDs** should be assigned to all header lines (lines that begin with one-or-more hash marks, `#`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, "markdown" should be capitalized as "Markdown" when referring to the formatting language.
- In markdown, **custom header IDs** should be assigned to all header lines
+ In Markdown, **custom header IDs** should be assigned to all header lines
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Html ID attributes are used to create links to specific sections of a document. In markdown, **custom header IDs** should be assigned to all header lines (lines that begin with one-or-more hash marks, `#`). | |
Html ID attributes are used to create links to specific sections of a document. In Markdown, **custom header IDs** should be assigned to all header lines (lines that begin with one-or-more hash marks, `#`). |
#### Or a longer title that can be shortened {#long-heading} | ||
``` | ||
|
||
Note that for short headers, simply lowercasing and using hyphens instead of spaces is sufficient. For longer headers, a shortened concise version of the header is encouraged. Must not repeat the same ID on the same page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a comma for clarity: "For longer headers, a shortened, concise version of the header is encouraged."
- For longer headers, a shortened concise version of the header is encouraged.
+ For longer headers, a shortened, concise version of the header is encouraged.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Note that for short headers, simply lowercasing and using hyphens instead of spaces is sufficient. For longer headers, a shortened concise version of the header is encouraged. Must not repeat the same ID on the same page. | |
Note that for short headers, simply lowercasing and using hyphens instead of spaces is sufficient. For longer headers, a shortened, concise version of the header is encouraged. Must not repeat the same ID on the same page. |
|
||
### English content | ||
|
||
These should be created for header on every new English markdown document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The article "the" seems to be missing before "header". It should be "for the header on every new English Markdown document."
- These should be created for header on every new English markdown document.
+ These should be created for the header on every new English Markdown document.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
These should be created for header on every new English markdown document. | |
These should be created for the header on every new English Markdown document. |
"Markdown" should be capitalized here as well.
- These should be created for the header on every new English markdown document.
+ These should be created for the header on every new English Markdown document.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
These should be created for header on every new English markdown document. | |
These should be created for the header on every new English Markdown document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition, thanks @wackerow!
Description
Note, info about using a script for this has been left off since we no longer have the "generate header ids" script that we had prior to the Next.js migration. We could consider adding something like this back to the repo.
Related Issue
Summary by CodeRabbit