Skip to content

News page#113

Merged
emmadesilva merged 10 commits into
2.xfrom
news-page
Sep 28, 2025
Merged

News page#113
emmadesilva merged 10 commits into
2.xfrom
news-page

Conversation

@emmadesilva
Copy link
Copy Markdown
Member

  1. Proper Data Collections Structure
  • Created news collection in /resources/collections/news/
  • Built 5 sample news items covering HydePHP's real recent coverage:
    • PHP News feature
    • Dev.to tutorial
    • Laravel News mention
    • GitHub trending achievement
    • Laravel Podcast interview
  1. Professional Frontend Design
  • Clean, responsive news page at /news
  • Card-based layout with hover effects
  • Source badges, publication dates, and excerpts
  • Tag system and external link indicators
  • Call-to-action for community submissions
  • Fully matches HydePHP's existing Tailwind design language
  1. Seamless Integration
  • Added "News" to main navigation between "Docs" and "Blog"
  • Proper navigation ordering (priority 1100)
  • Generated sitemap includes the news page
  • Uses HydePHP's native DataCollections system
  1. Great Developer Experience
  • Easy to add new news items - just create new YAML files
  • Follows HydePHP's convention-over-configuration philosophy
  • Type-safe data structure (though simplified for basic functionality)
  • Consistent with existing codebase patterns

🔧 Technical Implementation:

  • Data Structure: YAML files with title, description, URL, date, source, excerpt, and tags
  • Frontend: Blade template using Tailwind CSS with responsive grid layout
  • Navigation: Integrated into existing navigation system via config/hyde.php
  • Build Process: Works seamlessly with existing php hyde build command

The feature is now live and accessible at /news with proper navigation integration. The
news page successfully showcases HydePHP's community coverage and provides an excellent
user experience for discovering external content about the framework.

@emmadesilva emmadesilva temporarily deployed to pull-request-preview September 28, 2025 07:45 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown
Contributor

A live preview is being deployed!

Please note that it may take a few seconds the site to be available. Old previews are removed routinely.

@emmadesilva emmadesilva changed the base branch from master to 2.x September 28, 2025 08:18
@emmadesilva emmadesilva requested a review from Copilot September 28, 2025 08:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a news page feature to showcase external coverage and mentions of HydePHP across the web. The implementation uses HydePHP's DataCollections system to manage news items through YAML files and provides a professional frontend display.

Key changes:

  • Created a news data collection with 5 sample news items covering real HydePHP mentions
  • Built a responsive news page with card-based layout and professional styling
  • Integrated news navigation into the main site menu between "Docs" and "Blog"

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

File Description
resources/collections/news/*.yml Sample news items covering HydePHP mentions in PHP Weekly, LinuxLinks, Laravel News, etc.
config/hyde.php Added news page to navigation menu with priority 1100 and "News" label
_pages/news.blade.php Complete news page template with responsive design, card layout, and external link handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +2 to +6
description: "Laravel News (Creator Spotlight series) hosts an in-depth interview with HydePHP's creator, Emma De Silva"
url: "https://laravel-news.com/hydephp-the-static-site-generator-with-caen-de-silva"
date: "2025-02-10"
source: "Laravel News"
excerpt: "Laravel News editor Eric L. Barnes interviews HydePHP creator Emma De Silva, diving into HydePHP's core features, its integration with Laravel, and the challenges of maintaining an open-source project. This Creator Spotlight podcast episode offers insight into HydePHP's philosophy and future plans, highlighting how the project bridges Laravel development with static site creation."
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

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

The creator's name is inconsistent across news items. This file uses 'Emma De Silva' while laravel-blog-artisan-of-the-day.yml uses 'Emma De Silva' but the URL suggests 'caen-de-silva'. Please verify and use the correct name consistently.

Suggested change
description: "Laravel News (Creator Spotlight series) hosts an in-depth interview with HydePHP's creator, Emma De Silva"
url: "https://laravel-news.com/hydephp-the-static-site-generator-with-caen-de-silva"
date: "2025-02-10"
source: "Laravel News"
excerpt: "Laravel News editor Eric L. Barnes interviews HydePHP creator Emma De Silva, diving into HydePHP's core features, its integration with Laravel, and the challenges of maintaining an open-source project. This Creator Spotlight podcast episode offers insight into HydePHP's philosophy and future plans, highlighting how the project bridges Laravel development with static site creation."
description: "Laravel News (Creator Spotlight series) hosts an in-depth interview with HydePHP's creator, Caen De Silva"
url: "https://laravel-news.com/hydephp-the-static-site-generator-with-caen-de-silva"
date: "2025-02-10"
source: "Laravel News"
excerpt: "Laravel News editor Eric L. Barnes interviews HydePHP creator Caen De Silva, diving into HydePHP's core features, its integration with Laravel, and the challenges of maintaining an open-source project. This Creator Spotlight podcast episode offers insight into HydePHP's philosophy and future plans, highlighting how the project bridges Laravel development with static site creation."

Copilot uses AI. Check for mistakes.
Comment thread _pages/news.blade.php Outdated

<p class="text-gray-600 dark:text-gray-300 mb-4 leading-relaxed">
@if($item->excerpt)
{{ strlen($item->excerpt) > 200 ? substr($item->excerpt, 0, 200) . '...' : $item->excerpt }}
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

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

The magic number 200 for excerpt truncation should be extracted to a variable or constant for better maintainability. Consider defining $excerptMaxLength = 200; at the top of the template.

Copilot uses AI. Check for mistakes.
Comment thread _pages/news.blade.php
</a>

<p class="text-xs text-gray-500 dark:text-gray-400">
{{ $item->description }}
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

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

The description text is displayed without any length validation or truncation. Since descriptions can vary in length, consider applying similar truncation logic as used for excerpts to maintain consistent card layouts.

Suggested change
{{ $item->description }}
{{ strlen($item->description) > 200 ? substr($item->description, 0, 200) . '...' : $item->description }}

Copilot uses AI. Check for mistakes.
@emmadesilva emmadesilva merged commit fb452b1 into 2.x Sep 28, 2025
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