Skip to content

feat(resource): add curriculum and subject context to resource page and SEO metadata - #276

Merged
trtajim merged 1 commit into
mainfrom
feat/resource-subject-seo
Sep 2, 2026
Merged

feat(resource): add curriculum and subject context to resource page and SEO metadata#276
trtajim merged 1 commit into
mainfrom
feat/resource-subject-seo

Conversation

@trtajim

@trtajim trtajim commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Resource pages now display associated subject and course information alongside the resource title.
    • Resource SEO metadata includes subject and course details when available.
    • Video resources with external URLs now use YouTube thumbnails and video-specific Open Graph metadata.
  • Bug Fixes

    • Improved handling of resource types in meta descriptions.
  • Tests

    • Enhanced coverage for resource details, SEO metadata, and Inertia-based 404 responses.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 9f73fa58-f761-4d44-9052-cbc79aca0005

📥 Commits

Reviewing files that changed from the base of the PR and between a565c14 and e81d49e.

📒 Files selected for processing (6)
  • app/Http/Controllers/ResourceController.php
  • resources/js/pages/Resource.vue
  • resources/views/app.blade.php
  • tests/Feature/AdminForumTest.php
  • tests/Feature/ForumTest.php
  • tests/Feature/PublicPagesTest.php

📝 Walkthrough

Walkthrough

The resource page now receives related subject data, displays subject context, enriches SEO metadata, and uses YouTube thumbnails for external video resources. Feature tests now validate Inertia 404 components and subject-aware resource pages.

Changes

Resource subject metadata

Layer / File(s) Summary
Expose resource subject data
app/Http/Controllers/ResourceController.php
The controller eager-loads node.subject and returns the related subject in the resource page data.
Render subject-aware resource metadata
resources/views/app.blade.php, resources/js/pages/Resource.vue
The Blade template and Vue page include subject course and name in metadata. The Vue page displays the subject label above the resource title. Video resources use a YouTube thumbnail and video.other OG type when an external URL exists.
Validate resource and 404 responses
tests/Feature/PublicPagesTest.php, tests/Feature/AdminForumTest.php, tests/Feature/ForumTest.php
Tests validate subject props, enriched metadata, and Inertia errors/404 responses.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant ResourceController
  participant app.blade.php
  participant Resource.vue
  Browser->>ResourceController: request resource page
  ResourceController->>ResourceController: load node.subject
  ResourceController-->>app.blade.php: provide resource and subject data
  app.blade.php-->>Browser: render SEO metadata
  Browser->>Resource.vue: pass subject prop
  Resource.vue-->>Browser: render subject label and title
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/resource-subject-seo

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@trtajim
trtajim merged commit 7052f51 into main Sep 2, 2026
5 of 6 checks passed
@trtajim
trtajim deleted the feat/resource-subject-seo branch September 2, 2026 06:03
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