News page#113
Conversation
|
A live preview is being deployed! |
This reverts commit 6d3878c.
There was a problem hiding this comment.
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.
| 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." |
There was a problem hiding this comment.
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.
| 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." |
|
|
||
| <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 }} |
There was a problem hiding this comment.
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.
| </a> | ||
|
|
||
| <p class="text-xs text-gray-500 dark:text-gray-400"> | ||
| {{ $item->description }} |
There was a problem hiding this comment.
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.
| {{ $item->description }} | |
| {{ strlen($item->description) > 200 ? substr($item->description, 0, 200) . '...' : $item->description }} |
🔧 Technical Implementation:
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.