8000 feat: generate go-links for releases by elibosley · Pull Request #249 · unraid/docs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: generate go-links for releases #249

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

Merged
merged 3 commits into from
Mar 21, 2025
Merged

Conversation

elibosley
Copy link
Member
@elibosley elibosley commented Mar 20, 2025

Before Submitting This PR, Please Ensure You Have Completed The Following:

  1. Are internal links to wiki documents using relative file links?
  2. Are all new documentation files lowercase, with dash separated names (ex. unraid-os.mdx)?
  3. Are all assets (images, etc), located in an assets/ subfolder next to the .md/mdx files?
  4. Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  5. Is the build succeeding?

Summary by CodeRabbit

  • Refactor
    • Streamlined internal configuration settings for improved maintainability. No visible changes to functionality have been introduced.
  • New Features
    • Added a method for automatic redirects based on version numbers in release notes.
  • Chores
    • Updated Visual Studio Code extension recommendations to include additional formatting tools.

@elibosley elibosley requested a review from ljm42 March 20, 2025 21:12
Copy link
Contributor
coderabbitai bot commented Mar 20, 2025

Walkthrough

This pull request reformats the docusaurus.config.js file by consolidating multi-line object properties into a single-line format across various configuration sections such as theme, gtag, docs, navbar, footer, and tableOfContents. The changes remove extra line breaks and unnecessary indentation without altering any functionality or exported entities. Additionally, a new method createRedirects is introduced to manage automatic redirects.

Changes

File Change Summary
docusaurus.config.js Reformatted object properties in sections (theme, gtag, docs, navbar, footer, tableOfContents, and redirects) from multi-line to a compact single-line format; added createRedirects method.
.vscode/extensions.json Expanded the "recommendations" array to include an additional entry, changing it from one to two recommendations.

Possibly related PRs

Suggested Reviewers

  • ljm42

Poem

In the code's gentle, tidy maze,
I hop through changes in a daze.
Carrots crunch in each neat line,
As config spaces now align.
A rabbit's cheer, code so fine!
🥕🐇


🪧 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>, please review it.
    • Generate unit testing code 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 testing code 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

Actionable comments posted: 0

🧹 Nitpick comments (2)
docusaurus.config.js (2)

134-415: Footer Links and Go-Link Reformatting:
Multiple footer link entries—including documentation links, community links, and especially the go-link redirects—have been reformatted into single-line objects. This restructuring reduces visual clutter and promotes consistency. Please double-check that all URLs and labels are still accurate and align with the project’s navigation standards.


440-457: Enhancements for createRedirects Function:
The automatic redirect logic for release notes appears sound. However, consider simplifying the version check by using optional chaining—for example:

-            if (versionMatch && versionMatch[1]) {
+            if (versionMatch?.[1]) {

Additionally, the console.log statements used for debugging (lines 443 and 451) might be removed or conditionally enabled in production to avoid unnecessary console output.

🧰 Tools
🪛 Biome (1.9.4)

[error] 448-448: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f4ea67 and 2c27d32.

📒 Files selected for processing (1)
  • docusaurus.config.js (14 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
docusaurus.config.js

[error] 448-448: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (6)
docusaurus.config.js (6)

70-71: Consolidated Theme and Gtag Configurations:
The theme and gtag objects have been reformatted into a single-line style. This concise formatting improves visual clarity without affecting functionality.


87-87: Flattened Docs Sidebar Configuration:
The sidebar configuration now appears as a compact one-liner. This change reduces visual clutter while preserving the intended behavior.


112-112: Inline Navbar Logo Style Update:
The logo’s style property has been consolidated into a single line. Please verify that the width specification (“30px”) meets the design requirements.


117-118: Navbar ‘More’ Dropdown Links Formatting:
The external links for “Unraid Home” and “Forums” have been reformatted into single-line objects. This simplifies the configuration and maintains consistency.


124-124: Locale Dropdown Addition in Navbar:
The addition of { type: "localeDropdown", position: "right" } clearly exposes the multilingual selection option in the navbar. The concise format is appropriate.


127-127: Condensed Table of Contents Settings:
The table of contents configuration has been flattened into a single line. This streamlined presentation improves readability while retaining functionality.

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-249.d1o5s833kbd339.amplifyapp.com

@@ -550,6 +437,24 @@ const config = {
from: "/go/tailscale-docker",
},
],
createRedirects(existingPath) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@elibosley elibosley closed this Mar 21, 2025
@elibosley elibosley deleted the feat/go-links-for-releases branch March 21, 2025 13:57
@elibosley elibosley restored the feat/go-links-for-releases branch March 21, 2025 14:33
@elibosley elibosley reopened this Mar 21, 2025
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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
docusaurus.config.js (1)

440-455: Great addition of automatic go-links for release notes!

The new createRedirects function effectively creates automatic redirects for release notes based on version numbers, which aligns perfectly with the PR objective of generating go-links for releases.

One small improvement suggestion:

Consider using optional chaining on line 447 for a more concise check:

- if (versionMatch && versionMatch[1]) {
+ if (versionMatch?.[1]) {
🧰 Tools
🪛 Biome (1.9.4)

[error] 447-447: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 2c27d32 and a05351e.

📒 Files selected for processing (2)
  • .vscode/extensions.json (1 hunks)
  • docusaurus.config.js (14 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .vscode/extensions.json
🧰 Additional context used
🪛 Biome (1.9.4)
docusaurus.config.js

[error] 447-447: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build
  • GitHub Check: AWS Amplify Console Web Preview
🔇 Additional comments (1)
docusaurus.config.js (1)

70-71: Code formatting improvements look good!

The consolidated single-line formatting of configuration objects makes the code more compact while maintaining readability. This consistent approach across theme, gtag, docs, navbar, footer, and other sections improves the overall file structure.

Also applies to: 87-87, 112-112, 117-118, 124-124, 127-127, 134-134, 144-145, 151-154, 223-223, 250-251, 290-290, 304-304, 317-320, 325-325, 330-330, 355-355, 360-361, 374-374, 387-387, 404-405, 410-410

@elibosley elibosley merged commit a721b1f into main Mar 21, 2025
3 checks passed
@elibosley elibosley deleted the feat/go-links-for-releases branch March 21, 2025 15:36
@coderabbitai coderabbitai bot mentioned this pull request Mar 27, 2025
5 tasks
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.

2 participants
0