Skip to content

Improved the SEO of the documentation#15

Merged
meticha-admin merged 4 commits into
mainfrom
documentation/seo
Jun 17, 2025
Merged

Improved the SEO of the documentation#15
meticha-admin merged 4 commits into
mainfrom
documentation/seo

Conversation

@cavin-macwan

@cavin-macwan cavin-macwan commented Jun 17, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Improved release workflow to prevent duplicate releases for the same version tag.
  • Documentation
    • Enhanced site theming with a default dark mode and support for system color preferences.
    • Added SEO and social media metadata, including keywords, Twitter card image, and canonical URL.
    • Updated the homepage meta description for better search engine visibility.

This commit updates the Docusaurus configuration to set the default color mode to dark and disable respecting the user's prefers-color-scheme setting.

Key changes:

- **docs/docusaurus.config.ts**:
    - Added `colorMode` configuration within `themeConfig`.
    - Set `defaultMode` to `'dark'`.
    - Set `respectPrefersColorScheme` to `false`.
This commit updates the Docusaurus configuration and the homepage metadata for better SEO and user experience.

Key changes:

- **docs/docusaurus.config.ts**:
    - `respectPrefersColorScheme` is now set to `true` to honor the user's system preference.
    - Added `metadata` array with:
        - `keywords` for search engine optimization.
        - `twitter:card` pointing to the project banner image.
        - `canonical` link to the main project URL.
- **docs/src/pages/index.tsx**:
    - Updated the layout `description` to be more informative: "TriggerX is a modular, developer-friendly alarm execution library for Android".
This commit updates the `release.yaml` GitHub Actions workflow to prevent the creation of duplicate releases if a version tag already exists.

Key changes:

- **.github/workflows/release.yaml**:
    - Added a `fetch-depth: 0` to the checkout action to ensure all history is available for tag checking.
    - Introduced a new step "Check if version tag exists":
        - This step checks if a Git tag corresponding to the `env.VERSION_NAME` already exists.
        - Sets an output `version_exists` to `true` or `false`.
    - All subsequent steps in the release process (Setup gradle.properties, Set up JDK, Build Library, Extract Version, Generate Changelog, Create Git Tag, Create GitHub Release, Upload Release Artifact) are now conditionally executed based on `steps.check_version.outputs.version_exists == 'false'`.
    - Corrected a minor formatting issue with extra space in the `pull_request.types` trigger.
    - Removed an unnecessary blank line.
@coderabbitai

coderabbitai Bot commented Jun 17, 2025

Copy link
Copy Markdown

Walkthrough

The updates include enhancements to the release workflow to prevent duplicate releases by checking for existing version tags before proceeding. Documentation configuration was improved by adding dark mode support and SEO metadata, and the homepage meta description was updated for better clarity and search engine optimization.

Changes

Files/Groups Change Summary
.github/workflows/release.yaml Added check for existing version tags; conditionally runs release steps to avoid duplicates.
docs/docusaurus.config.ts Added dark mode support and SEO/social metadata to Docusaurus configuration.
docs/src/pages/index.tsx Updated homepage meta description for improved SEO.

Suggested labels

documentation

Suggested reviewers

  • meticha-admin

Poem

In the warren of code, a new check appears,
To stop double tags and release engineers' tears.
Docs now glow in a dark, cozy hue,
With metadata shining for search engines too.
The rabbit hops on, with a whisker-twitch grin—
Each change a small victory, let the releases begin!
🐇✨


📜 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 19ffd59 and a873cd5.

📒 Files selected for processing (1)
  • .github/workflows/release.yaml (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/release.yaml

🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/docusaurus.config.ts (1)

64-68: Correct Twitter card metadata
The canonical link and keywords tags are correctly configured. However, twitter:card should specify a valid card type (e.g., summary_large_image), and you need a separate twitter:image tag for the banner URL.

.github/workflows/release.yaml (1)

88-97: Use updated release action
actions/create-release@v1 works fine but consider upgrading to the latest actions/create-release minor version (v1.x or v2) for new features and fixes.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6c92748 and 19ffd59.

📒 Files selected for processing (3)
  • .github/workflows/release.yaml (5 hunks)
  • docs/docusaurus.config.ts (1 hunks)
  • docs/src/pages/index.tsx (1 hunks)
🔇 Additional comments (11)
docs/src/pages/index.tsx (1)

37-37: Good SEO description update
The new meta description is concise, under 160 characters, and accurately conveys the library’s purpose.

docs/docusaurus.config.ts (1)

60-63: Enable dark mode respecting user preference
The colorMode settings default to dark and honor system preferences, improving UX for users with dark-theme environments.

.github/workflows/release.yaml (9)

22-22: Fetch full git history for tag checks
Using fetch-depth: 0 ensures all tags and commits are available for the subsequent existence check.


24-35: Prevent duplicate releases by checking existing tags
The check_version step correctly sets version_exists based on the presence of v${{ env.VERSION_NAME }}.


38-43: Conditional gradle.properties setup
Gating the creation of gradle.properties on version_exists == 'false' is implemented correctly.


45-50: Conditional Java setup step
Skipping JDK setup when the version tag exists avoids unnecessary actions.


51-54: Conditional build step
Building only for new versions prevents redundant artifact compilation.


55-63: Extract version dynamically
Parsing VERSION_NAME from gradle.properties and exporting it as env.version is correct and consistent.


64-79: Generate changelog from git history
The fallback to the initial commit and the git log formatting produce a concise changelog.


80-87: Tag creation and push
Configuring Git user and pushing the annotated tag only for new versions is sound.


103-112: Upload artifact with proper content type
The upload-release-asset step correctly uses application/octet-stream for the AAR.

Comment thread .github/workflows/release.yaml
This commit updates the GitHub Actions workflow for releases to ensure it only runs when a pull request is merged.

Key changes:

- **.github/workflows/release.yaml**:
    - Added a condition `if: github.event.pull_request.merged == true` to the `release` job.
@meticha-admin
meticha-admin merged commit 4812400 into main Jun 17, 2025
1 check passed
@meticha-admin
meticha-admin deleted the documentation/seo branch June 17, 2025 18:07
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