Closed ttizze closed 2 months ago
The changes involve several updates to the queries.server.ts
files, renaming functions for clarity and adding new functionalities, including fetching all users and published pages. The index.tsx
files have been modified to enhance SEO capabilities through dynamic sitemap generation. Additionally, a new column for tracking updates was added to the database schema, and the Prisma model was updated to reflect this change. A new dependency for SEO optimization was introduced in the project.
Files | Change Summary |
---|---|
web/app/routes/$userName+/functions/queries.server.ts |
Renamed functions for clarity; added fetchAllUsersName . |
web/app/routes/$userName+/index.tsx |
Replaced existing query functions with renamed ones; added sitemap generation functionality. |
web/app/routes/$userName+/page+/$slug+/functions/queries.server.ts |
Added fetchAllPublishedPages function to retrieve published pages. |
web/app/routes/$userName+/page+/$slug+/index.tsx |
Introduced handle for SEO with getSitemapEntries method. |
web/app/routes/sitemap.xml.ts |
Implemented a loader function to generate a sitemap dynamically. |
web/package.json |
Added dependency @nasa-gcn/remix-seo for SEO functionalities. |
web/prisma/migrations/20240904092615_/migration.sql |
Added updated_at column to pages table; populated existing records. |
web/prisma/schema.prisma |
Introduced updatedAt field in Page model with @updatedAt attribute. |
sequenceDiagram
participant User
participant WebApp
participant Database
participant SEOService
User->>WebApp: Request user page
WebApp->>Database: fetchSanitizedUserWithPages(userName)
Database-->>WebApp: Return user data
WebApp->>Database: fetchAllPublishedPages()
Database-->>WebApp: Return published pages
WebApp->>SEOService: getSitemapEntries()
SEOService-->>WebApp: Return sitemap entries
WebApp-->>User: Display user page with sitemap
🐰 In the garden where data grows,
New paths and functions, like flowers, pose.
With sitemaps blooming, bright and clear,
Fetching users and pages, oh so dear!
Hopping through code, I dance with glee,
Celebrating changes, come join me! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores