Skip to content

Centralize product configuration and enhance home page#2

Merged
zackkatz merged 11 commits intomainfrom
develop
Jan 28, 2026
Merged

Centralize product configuration and enhance home page#2
zackkatz merged 11 commits intomainfrom
develop

Conversation

@zackkatz
Copy link
Copy Markdown
Member

@zackkatz zackkatz commented Jan 28, 2026

Summary

  • Centralize all product metadata (descriptions, purchaseUrls, categories) in repos-config.json
  • Refactor home page to dynamically render products by category
  • Add dynamic "Learn More" navbar button with UTM tracking
  • Reorder navbar: GravityKit Products before GravityView
  • Add product icons for all products on home page
  • Add Third Party section for third-party plugins

Changes

Configuration

  • repos-config.json: Add descriptions, purchaseUrls, titles, and category metadata

Home Page

  • src/pages/index.js: Refactored to read from centralized config
  • Products grouped by category with proper ordering
  • GravityView displayed at end of GravityKit Products list
  • Third Party section for isThirdParty products

Navbar

  • src/theme/NavbarItem/ProductLearnMoreLink.js: Dynamic button based on current page
  • src/theme/NavbarItem/ComponentTypes.js: Register custom navbar component
  • docusaurus.config.js: Reorder menus, GravityKit Products first
  • src/css/custom.css: Button styling with proper spacing

Assets

  • Add 19 product icon SVGs
  • Remove 7 deprecated icon files with inconsistent naming

Documentation

  • README.md: Document repos-config.json schema and categories

Bug Fix

  • scripts/generate-php-api.mjs: Hide functions section when no functions documented

Test plan

  • Verify home page displays all products grouped by category
  • Verify GravityKit Products appears first, with GravityView at end of list
  • Verify Third Party section shows only Gravity Forms
  • Verify Learn More button updates based on current product page
  • Verify navbar order: GravityKit Products | GravityView
  • Verify all product icons display correctly

Summary by CodeRabbit

Release Notes

  • New Features

    • Reorganized navigation menu with categorized product dropdowns (GravityView and GravityKit)
    • Added "Learn More" links for products with UTM tracking
    • Expanded product catalog with new entries and enhanced metadata (descriptions, purchase URLs, free/third-party indicators)
  • Documentation

    • Enhanced README with detailed guidance on product configuration and category structure
  • Style

    • Added navbar styling for dropdown separators, headings, and purchase call-to-action buttons

✏️ Tip: You can customize this high-level summary in your review settings.

Add pagination_prev: null and pagination_next: null to the product
index template to remove the next/previous footer navigation.
Both now use the same hasMeaningfulDoc filter, ensuring methods
in the table always have corresponding entries in the Method
Reference section below.
HTML tags in PHPDoc descriptions (like <select>, <button>, <script>)
were being interpreted as actual HTML by Docusaurus, breaking the page
rendering and causing method sections to be truncated.

Added HTML escaping to:
- mdEscape() for table cells
- htmlEscape() helper for inline markdown content
- Class summaries and descriptions
- Method summaries and descriptions
- Function summaries and descriptions
- Deprecated tag descriptions
- Class/function index page summaries

Fixes 60+ broken anchor warnings caused by page truncation.
Add descriptions, purchaseUrls, titles, and category metadata
to enable dynamic rendering across home page and navbar.
- Read product data from repos-config.json
- Group products by category with proper ordering
- Add Third Party section for isThirdParty products
- Show product icons for all sections
- Create custom ProductLearnMoreLink navbar component
- Add UTM tracking parameters to purchase URLs
- Reorder menus: GravityKit Products before GravityView
- Style navbar button with proper spacing
Add SVG icons for all products, renamed to match product IDs.
Remove deprecated icon files with inconsistent naming.
Remove old icon files with inconsistent naming conventions.
Expand configuration section with full schema documentation
including purchaseUrl and category configuration options.
Only show Functions link and count in API index when there are
functions to display. Adds pagination_prev/next: null to index.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 28, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

This PR restructures the product catalog and navigation system from a flat, hard-coded architecture to a categorized, configuration-driven system. It introduces a new GravityKit category in repos-config.json, enriches product metadata with descriptions and purchase URLs, and refactors navigation and homepage components to dynamically render content from centralized configuration. Supporting changes include HTML escaping for markdown safety and new navbar styling.

Changes

Cohort / File(s) Summary
Configuration Enrichment
repos-config.json
Added new gravitykit category. Enhanced existing categories (gravityview, gravityview-extensions, gravityview-layouts, gravity-forms) with descriptions and position metadata. Enriched all product entries with description, category, purchaseUrl, and flags (isFree, isThirdParty). Introduced new products: gravityview-advanced-elementor, gravityexport-lite, gravity-forms-elementor-widget.
Navigation Restructure
docusaurus.config.js
Replaced flat product navigation with categorized dropdown system. Added helper functions to fetch products by category and free add-ons. Introduced new gravityview_nav and gravitykit_nav dropdown configurations with section headers and separators. Replaced static Products item with right-aligned custom product link.
Dynamic Content Generation
src/pages/index.js
Replaced hard-coded product arrays with dynamic generation from repos-config.json. Added helper functions: getProductsByCategory(), getThirdPartyProducts(), getSortedCategories(). Refactored ProductCard and ProductSection components to use product.id for image paths and dynamic rendering.
Navbar Components
src/theme/NavbarItem/ComponentTypes.js,
src/theme/NavbarItem/ProductLearnMoreLink.js
Extended ComponentTypes to include new custom-productLearnMoreLink mapping. Created ProductLearnMoreLink component to extract product ID from current path, lookup metadata, and generate Learn More links with UTM tracking parameters (utm_source, utm_medium, utm_campaign, utm_content).
Styling
src/css/custom.css
Added navbar dropdown styling: .dropdown-separator, .dropdown-heading, .dropdown-heading-item, .navbar-purchase-button with hover and dark-mode variants.
PHP API Generation
scripts/generate-php-api.mjs
Introduced htmlEscape() function to safely escape HTML entities in markdown output. Extended mdEscape() to handle < and > characters. Applied HTML escaping to class/function summaries, descriptions, and related fields throughout index and page generation.
Documentation & Metadata
README.md
Enhanced guidance on repos-config.json structure with descriptive text for fields, categories, and products. Added schema overview, field type tables, and example for adding new products with category and purchaseUrl.
Pagination Configuration
templates/hooks/actions-index.md,
templates/hooks/filters-index.md,
templates/hooks/main-index.md,
templates/hooks/product-index.md
Added front matter fields: pagination_prev: null and pagination_next: null to each template file.

Sequence Diagram

sequenceDiagram
    participant User
    participant Navbar
    participant DocConfig as docusaurus.config.js
    participant ReposConfig as repos-config.json
    participant ProductLink as ProductLearnMoreLink
    participant Page as Homepage

    User->>Navbar: Load site
    Navbar->>DocConfig: Request navigation structure
    DocConfig->>ReposConfig: Fetch categories & products
    ReposConfig-->>DocConfig: Return category/product metadata
    DocConfig->>Navbar: Render categorized dropdowns
    Navbar-->>User: Display navigation with GravityView & GravityKit dropdowns

    User->>Page: Navigate to homepage
    Page->>ReposConfig: Fetch all categories
    ReposConfig-->>Page: Return sorted categories
    Page->>ReposConfig: Fetch products by category
    ReposConfig-->>Page: Return filtered products
    Page->>Page: Render ProductSections dynamically
    Page-->>User: Display categorized product grid

    User->>ProductLink: Click "Learn More" link
    ProductLink->>ReposConfig: Lookup product by ID
    ReposConfig-->>ProductLink: Return purchaseUrl & metadata
    ProductLink->>ProductLink: Append UTM parameters
    ProductLink-->>User: Navigate to purchase page
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • GravityKit/gravitykit.dev#1: Direct modifications to scripts/generate-php-api.mjs align with HTML-escaping improvements introduced in the referenced PR's PHP API generation overhaul.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackkatz zackkatz merged commit 9e74616 into main Jan 28, 2026
1 check was pending
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