Skip to content

vs-branch-7#35

Merged
VatsalSy merged 4 commits into
mainfrom
vs-branch-7
Apr 16, 2025
Merged

vs-branch-7#35
VatsalSy merged 4 commits into
mainfrom
vs-branch-7

Conversation

@VatsalSy

Copy link
Copy Markdown
Member
  • Change icon color to match text
  • Enhance SEO with redirect pages for tag filters
  • Add SEO-friendly redirects for research tags
  • Improve link formatting and readability in the "About CoMPhy" section

@coderabbitai

coderabbitai Bot commented Apr 16, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Corrected malformed Markdown link syntax in the "Research Focus" section to ensure proper link rendering.
  • Style

    • Updated icon color styling so icons now match the surrounding text color, improving visual consistency across the site.
  • Chores

    • Removed an unused script previously responsible for dynamically loading FontAwesome stylesheets.
    • Updated workflow configuration to ensure deployment only occurs on pushes to the main branch, not on pull requests.
  • Refactor

    • Improved research tag filtering by generating lightweight redirect pages for each tag, enhancing SEO and simplifying navigation. The sitemap and meta tags were also updated for better search engine indexing.

Walkthrough

This update introduces several changes across the repository. The Ruby script responsible for generating filtered research pages is refactored to create SEO-friendly static redirect pages for each tag, update sitemap entries, and enhance meta tags for the main research page. A JavaScript file for dynamically loading FontAwesome stylesheets is removed. The Jekyll GitHub Actions workflow is updated to restrict deployment to pushes on the main branch only. CSS rules for icon coloring are adjusted to inherit text color, and Markdown link syntax is corrected in the "aboutCoMPhy.md" file.

Changes

Files/Paths Change Summary
scripts/generate_filtered_research.rb Refactored to generate static SEO-friendly redirect pages for tags, update sitemap with new URLs, add meta tags, handle multiple tag variants, and create a tags index and 404 redirect page.
.github/assets/js/shortcut-key.js Deleted script that dynamically loaded FontAwesome CSS files via JavaScript.
.github/workflows/jekyll.yml Updated workflow to only deploy on push events to the main branch, preventing deployment on pull request events.
assets/css/styles.css Changed icon color variable and rules so icons inherit text color; updated related comments and selectors.
aboutCoMPhy.md Fixed malformed Markdown link syntax in two tag links within the "Research Focus" section.

Sequence Diagram(s)

sequenceDiagram
    participant Script as generate_filtered_research.rb
    participant FileSystem as File System
    participant Sitemap as sitemap.xml
    participant ResearchPage as research.md

    Script->>FileSystem: Generate redirect page for each tag (multiple case variants)
    Script->>FileSystem: Generate tags index page with links to main research page
    Script->>FileSystem: Generate 404 catch-all redirect page for invalid tags
    Script->>Sitemap: Add tag parameter URLs and redirect pages to sitemap.xml
    Script->>ResearchPage: Add/update meta description and keywords tags
Loading

Possibly related PRs

  • SEO-and-paper-update #23: Introduces a new SEO metadata generation script and a workflow for site rebuilds on search database updates, directly related to the SEO and sitemap enhancements in this PR.

Poem

In the warren of code, a rabbit hopped,
Old scripts retired, new redirects dropped.
Icons now blend with text so neat,
And links in Markdown are a treat.
SEO tags shine, the sitemap grows,
On main branch pushes, deployment flows.
🐇 With tidy paws, the site now glows!

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.
✨ Finishing Touches
  • 🔥 Error while generating docstrings. (🔄 Check again to generate docstrings again)

🪧 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.
  • @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
Contributor

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)
scripts/generate_filtered_research.rb (1)

119-122: Consider adding a trailing comma to the multiline array.

RuboCop suggests:

  [
    tag.capitalize.gsub(/\s+/, '-'),
    hyphenated_tag,
    tag.split.map(&:capitalize).join('-')
- ].uniq
+ ].uniq,

This is purely stylistic but helps maintain consistency with typical Ruby style conventions.

🧰 Tools
🪛 RuboCop (1.73)

[convention] 121-121: Put a comma after the last item of a multiline array.

(Style/TrailingCommaInArrayLiteral)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8ff0928 and 0205b9d.

📒 Files selected for processing (5)
  • .github/assets/js/shortcut-key.js (0 hunks)
  • .github/workflows/jekyll.yml (1 hunks)
  • aboutCoMPhy.md (1 hunks)
  • assets/css/styles.css (2 hunks)
  • scripts/generate_filtered_research.rb (4 hunks)
💤 Files with no reviewable changes (1)
  • .github/assets/js/shortcut-key.js
🧰 Additional context used
🪛 RuboCop (1.73)
scripts/generate_filtered_research.rb

[convention] 121-121: Put a comma after the last item of a multiline array.

(Style/TrailingCommaInArrayLiteral)

🔇 Additional comments (15)
.github/workflows/jekyll.yml (1)

35-36: Restricting deployment to main branch pushes looks correct.

By adding an if expression that checks both github.event_name and github.ref, you ensure that the deploy job only runs on direct pushes to the main branch. This is a viable approach to avoid accidentally deploying changes from PR events or other branches.

assets/css/styles.css (2)

30-30: Good move changing the light theme icon color.

Replacing --icon-color from white to #333333 aligns icons more closely with the default text color, enhancing overall visual consistency.


103-112: Icons inheriting the parent text color is a clean approach.

Setting color: inherit; ensures that icons always match the surrounding text in both light and dark themes, simplifying maintenance and preserving stylistic consistency.

scripts/generate_filtered_research.rb (11)

4-4: Requiring 'cgi' is appropriate for URL encoding.

Including require 'cgi' is a solid choice to safely escape tag names for query parameters, guarding against invalid or unsafe characters.


9-11: Ensuring the output directory exists.

Creating the _site/research/tags directory if it doesn’t already exist prevents file-writing errors when generating redirect pages.


25-29: Sitemap generation pre-check is sensible.

Conditionally checking for an existing sitemap.xml file avoids runtime errors when attempting to read or modify a missing sitemap.


31-56: Appending new tag filter entries to sitemap.

Your logic for creating <url> elements for both the ?tag= parameter and the static /tags/slug.html page ensures robust SEO coverage. Consider verifying no duplicates appear in the sitemap, but this approach is generally sound.


58-76: Adding SEO meta tags to the research page.

Injecting meta description and keywords dynamically based on discovered tags is a straightforward way to improve search engine visibility. The use of unless checks helps avoid duplicates.


78-81: Overwriting the updated research page.

Persisting the modified HTML with doc.to_html ensures your new meta tags are properly embedded.


82-129: Generating static HTML redirects for each tag looks great.

The combination of <meta http-equiv="refresh"> and JavaScript redirect ensures coverage even if one or the other fails. Multiple variant files (lowercase, capitalize, etc.) handle user URL casing gracefully.

🧰 Tools
🪛 RuboCop (1.73)

[convention] 121-121: Put a comma after the last item of a multiline array.

(Style/TrailingCommaInArrayLiteral)


138-140: Tags index page with a meta refresh is helpful for SEO.

Listing tags in the index along with an immediate redirect fosters search engine crawling of all tag variants while seamlessly directing users to the main research page.


143-152: Populating the tag list.

Embedding each tag link via "#{CGI.escape(tag)}" ensures safe query parameters. This is consistent with the approach used in the redirect pages.


160-189: Catch-all 404 page for invalid tag URLs is smart.

Providing a fallback redirect if a user lands on /research/tags/nonexistent-tag.html both improves user experience and helps keep the site tidy from an SEO standpoint.


190-190: Clear completion message.

Printing a final success notice offers good visibility in the build logs, confirming successful execution of the filter-and-redirect generation.

aboutCoMPhy.md (1)

6-6: Corrected malformed Markdown link syntax for tag-based research links.

The Markdown links for "singular" and "elastoviscoplastic" tags are now properly formatted and will render as intended, improving navigation and SEO consistency.

Also applies to: 9-9

@coderabbitai

coderabbitai Bot commented Apr 16, 2025

Copy link
Copy Markdown
Contributor

Caution

No docstrings were generated.

@VatsalSy
VatsalSy merged commit e951756 into main Apr 16, 2025
@VatsalSy
VatsalSy deleted the vs-branch-7 branch April 21, 2025 14:03
VatsalSy added a commit that referenced this pull request Jun 29, 2026
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.

1 participant