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

fix: Cleaning up docs bugs #3856

Merged
merged 3 commits into from
Feb 7, 2025
Merged

fix: Cleaning up docs bugs #3856

merged 3 commits into from
Feb 7, 2025

Conversation

yhakbar
Copy link
Collaborator

@yhakbar yhakbar commented Feb 7, 2025

Description

Fixes code fence in overview, and uses opposing dark and light logos for each theme.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added / Removed / Updated [X].

Migration Guide

Summary by CodeRabbit

  • New Features

    • Enhanced logo support that now displays distinct light and dark themes for improved visual consistency.
  • Documentation

    • Added a new Terragrunt configuration example, detailing remote state management and AWS provider setups to guide users in infrastructure configuration.
    • Updated image references in the documentation's hero section to support light and dark themes.

Copy link

vercel bot commented Feb 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
terragrunt-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 6:09pm

Copy link
Contributor

coderabbitai bot commented Feb 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request updates the logo configuration and documentation for theme support and Terragrunt usage. The configuration file now uses distinct logo paths for dark and light modes, replacing the single logo reference. Additionally, the documentation introduces a new Terragrunt configuration example detailing remote state management, AWS provider setup, module sourcing, and input variables. The hero section in the docs has also been updated to reference separate logo images for dark and light themes.

Changes

File(s) Summary
docs-starlight/astro.config.mjs
docs-starlight/src/content/docs/index.mdx
Changed logo references by replacing the single src attribute with two distinct attributes: dark and light to support dark and light themes.
docs-starlight/src/content/docs/01-getting-started/02-overview.mdx Added a new Terragrunt documentation section with an example configuration for remote state management, AWS provider settings, module sourcing, and input variables.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant Site
  participant Config
  participant ThemeSelector

  Browser->>Site: Request page
  Site->>Config: Read logo configuration
  Config-->>Site: Provide dark & light logo paths
  Site->>ThemeSelector: Determine active theme
  ThemeSelector-->>Site: Return active theme (dark/light)
  Site-->>Browser: Render page with corresponding logo
Loading

Suggested reviewers

  • levkohimins
  • denis256

Poem

In the code where themes take flight,
Logos now change from day to night.
Dark or light, the paths defined,
Terragrunt docs well-aligned.
A little tweak, a joyful byte!

🌟 Happy coding! 🌟


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a32945d and c1a902e.

📒 Files selected for processing (1)
  • docs-starlight/src/content/docs/index.mdx (1 hunks)

🪧 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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)
docs-starlight/src/content/docs/01-getting-started/02-overview.mdx (2)

136-148: Add syntax highlighting to command output blocks.

These code blocks show command outputs but don't specify a language for syntax highlighting. Consider adding bash or shell as the language identifier.

Also applies to: 164-170, 378-390, 467-477, 486-496


950-1014: Great section on keeping things simple!

The KISS section effectively demonstrates:

  • Why simpler is often better
  • Trade-offs between clever and maintainable code
  • Real-world considerations

Consider adding a callout box or warning section to make the Windows path separator gotcha more visible.

🧰 Tools
🪛 LanguageTool

[grammar] ~1002-~1002: The verb ‘include’ does not usually follow articles like ‘an’. Check that ‘include’ is spelled correctly; using ‘include’ as a noun may be non-standard.
Context: ...runt.hcl file that is being run during an include (us-east-1andus-west-1` in each re...

(A_INFINITIVE)


[style] ~1008-~1008: ‘prefer to have’ might be wordy. Consider a shorter alternative.
Context: ...what you want. In this case, you might prefer to have kept the region.hcl file, as it makes...

(EN_WORDINESS_PREMIUM_PREFER_TO_HAVE)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7c9f208 and a32945d.

⛔ Files ignored due to path filters (2)
  • docs-starlight/src/assets/logo-dark.svg is excluded by !**/*.svg
  • docs-starlight/src/assets/logo-light.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • docs-starlight/astro.config.mjs (1 hunks)
  • docs-starlight/src/content/docs/01-getting-started/02-overview.mdx (1 hunks)
  • docs-starlight/src/content/docs/index.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs-starlight/src/content/docs/index.mdx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: unessential
🔇 Additional comments (3)
docs-starlight/astro.config.mjs (1)

12-13: Nice theme-aware logo configuration! Let's verify the file paths.

The logo configuration looks good, using separate logos for dark and light themes. The naming is intuitive - light logo for dark theme and dark logo for light theme.

Let's confirm the logo files exist:

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Check if the logo files exist in the public directory
fd -t f "logo-(light|dark).svg$" "src/assets"

Length of output: 143


Let's make sure we're checking the right spot. The earlier command targeted "src/assets", which doesn't seem to exist in the repo. I'll run a script to search the entire repository for any "logo-light.svg" or "logo-dark.svg" files.


🏁 Script executed:

#!/bin/bash
# Search for the logo files anywhere in the repository
fd -t f --regex "logo-(light|dark)\\.svg$"

Length of output: 124


Theme-aware logo configuration verified!

The logo files are indeed present in the repo at "docs-starlight/src/assets" – matching what's expected when building with docs-starlight as the project root. With the configuration referencing "/src/assets/logo-light.svg" and "/src/assets/logo-dark.svg", it correctly maps to the files in the project. Great work on making the setup theme-specific!

docs-starlight/src/content/docs/01-getting-started/02-overview.mdx (2)

11-19: Great introduction that sets clear expectations!

The introduction effectively:

  • Acknowledges different user experience levels
  • Links to relevant documentation
  • Sets appropriate context for the complexity level

847-950: Excellent explanation of repository patterns!

The section on repository patterns is thorough and practical:

  • Clear explanation of infrastructure-live vs infrastructure-modules
  • Good examples of file organization
  • Helpful diagrams and real-world scenarios
🧰 Tools
🪛 LanguageTool

[style] ~847-~847: This phrase is redundant. Consider using “Outside”.
Context: .... ### Recommended Repository Patterns Outside of the patterns used for setting up Terrag...

(OUTSIDE_OF)


[duplication] ~848-~848: Possible typo: you repeated a word.
Context: ... configurations within a project, there are are also some patterns that we recommend fo...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~856-~856: This expression is usually spelled with a hyphen.
Context: ...tive). Most successful teams stick to [Trunk Based Development](https://trunkbaseddevelopm...

(BASED_HYPHEN)


[style] ~942-~942: ‘end result’ might be wordy. Consider a shorter alternative.
Context: ...onment they are being deployed to. The end result of this process is that _infrastructure...

(EN_WORDINESS_PREMIUM_END_RESULT)

@@ -5,7 +5,8 @@ template: splash
hero:
tagline: Flexible orchestrator to scale IaC.
image:
file: ../../assets/logo.svg
dark: ../../assets/logo-light.svg
Copy link
Contributor

Choose a reason for hiding this comment

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

Use absolute paths so that this content can be moved easily

@yhakbar yhakbar merged commit c040e19 into main Feb 7, 2025
4 of 6 checks passed
@yhakbar yhakbar deleted the fix/cleaning-up-docs-bugs branch February 7, 2025 18:09
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