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

feat: add /docs/header-ids.md #12443

Merged
merged 1 commit into from
Mar 22, 2024
Merged

feat: add /docs/header-ids.md #12443

merged 1 commit into from
Mar 22, 2024

Conversation

wackerow
Copy link
Member

@wackerow wackerow commented Mar 13, 2024

Description

  • Adds info to repo docs related to custom header id usage

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

  • Documentation
    • Introduced guidelines for using custom header IDs in markdown documents, including syntax, usage, and best practices.

Copy link
Contributor

coderabbitai bot commented Mar 13, 2024

Walkthrough

This 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

File Change Summary
docs/header-ids.md Introduced guidelines for using custom header IDs in markdown, including syntax and usage examples.

Assessment against linked issues

Objective Addressed Explanation
Create documentation to explain the importance of header ids in markdown files (#6196)
Explain why header ids are important for consistent anchor links across languages and calculating translation status (#6196)
Detail how header ids are generated, manually or using the script generate-heading-ids.js (#6196)
Encouragement for contributions from the Ethereum community through comments on relevant issues (#6196) The change summary does not mention any specific encouragement for community contributions or guidance on how to comment on issues for potential pull requests.

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?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

netlify bot commented Mar 13, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 52744da
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/65f232c16f91180008d27132
😎 Deploy Preview https://deploy-preview-12443--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between 542866c and 52744da.
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
Copy link
Contributor

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.

Suggested change
# 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, `#`).
Copy link
Contributor

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.

Suggested change
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.
Copy link
Contributor

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.

Suggested change
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.
Copy link
Contributor

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.

Suggested change
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.

Suggested change
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.

Copy link
Member

@pettinarip pettinarip left a 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!

@pettinarip pettinarip merged commit 85a47d5 into dev Mar 22, 2024
6 checks passed
@pettinarip pettinarip deleted the custom-heading-ids branch March 22, 2024 12:40
This was referenced Mar 26, 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.

Document header ids
2 participants