Skip to content

Conversation

@Feretj
Copy link

@Feretj Feretj commented Oct 22, 2025

Add Dockerfile and make config changes to include this app in docker-compose

Summary by CodeRabbit

  • New Features

    • Home page now dynamically displays paginated posts
    • Added pagination support for browsing posts by category, tag, and author
  • Chores

    • Environment variable naming standardized across configuration
    • Docker containerization support added
    • Navigation menu restructured with new links
    • Site branding and theme preferences updated
    • Removed static page generation for improved performance
  • Documentation

    • Configuration guides updated with standardized environment variables
@vercel
Copy link

vercel bot commented Oct 22, 2025

@Feretj is attempting to deploy a commit to the 9d8 Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Oct 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR renames environment variables from WORDPRESS_* to NEXT_WORDPRESS_*, introduces Docker containerization support, adds server-side pagination APIs to the WordPress client library, converts static site generation to dynamic data-driven pages, and updates the site branding to Russian locale with corresponding UI/layout modifications.

Changes

Cohort / File(s) Change Summary
Environment Variable Renaming
.env.example, CLAUDE.md, README.md, app/api/revalidate/route.ts, lib/wordpress.ts, next.config.ts, plugin/README.md, plugin/next-revalidate/README.txt, plugin/next-revalidate/next-revalidate.php
Renames WORDPRESS_URLNEXT_WORDPRESS_URL, WORDPRESS_HOSTNAMENEXT_WORDPRESS_URL, and WORDPRESS_WEBHOOK_SECRETNEXT_WORDPRESS_WEBHOOK_SECRET across configuration files, code, and documentation.
Docker & Containerization
Dockerfile, docker-entrypoint.sh, .dockerignore
Adds multi-stage Node.js/Alpine Dockerfile for Next.js production builds, entrypoint script orchestrating build and startup, and .dockerignore to exclude build artifacts from Docker context.
WordPress API Pagination
lib/wordpress.ts
Introduces WordPressPaginationHeaders and WordPressResponse<T> types; adds wordpressFetchWithPagination() function and new paginated endpoints: getPostsPaginated(), getAllPostSlugs(), getPostsByCategoryPaginated(), getPostsByTagPaginated(), getPostsByAuthorPaginated(); updates existing endpoints to fetch with per_page: 100.
Dynamic Page Rendering & SSG Removal
app/page.tsx, app/posts/[slug]/page.tsx, components/posts/post-card.tsx, app/sitemap.ts
Converts Home page to async data-driven component fetching posts via getPostsPaginated(1, 30); removes generateStaticParams() from post slug pages and author fetching from PostCard; comments out post URL generation in sitemap.
Layout & UI Updates
app/layout.tsx
Updates metadata to Russian text; changes theme default from "system" to "light"; removes logo image and "Get Started" button from Nav; refactors Footer with flex layout, conditional Blog section rendering, and removed logo markup.
Navigation & Menu Configuration
menu.config.ts, components/nav/mobile-nav.tsx
Restructures mainMenu to include posts, pages, authors, about; empties contentMenu to an explicit empty Record<string, string> type; adds conditional rendering of Blog Menu in mobile-nav only when contentMenu has entries.
Site Configuration
site.config.ts, next.config.ts
Updates site branding (name, description, domain) to Russian locale; changes Next.js image remote patterns from explicit hostname to URL-based patterns with NEXT_WORDPRESS_URL and hardcoded https://sysblok.ru/wp-content/**.

Sequence Diagram(s)

sequenceDiagram participant Client as Client / Browser participant NextApp as Next.js App participant Docker as Docker Container participant WordPress as WordPress Backend Note over Docker: docker-entrypoint.sh Docker->>Docker: npm run build (SSG + SSR setup) Docker->>NextApp: npm run start Client->>NextApp: Request / NextApp->>NextApp: Home() async function NextApp->>WordPress: getPostsPaginated(1, 30) WordPress-->>NextApp: {posts: [...], headers: {...}} NextApp-->>Client: Render posts grid or "No posts found" Client->>NextApp: Request /posts/[slug] NextApp->>WordPress: getPostById(slug) WordPress-->>NextApp: Post data alt Author available NextApp->>WordPress: getAuthorById(post.author) WordPress-->>NextApp: Author data else Author fetch fails NextApp->>NextApp: author = undefined end NextApp-->>Client: Render post with optional author byline 
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

The changes span multiple layers (config, docs, API, UI, Docker) with a mix of homogeneous updates (env var renames across many files) and heterogeneous logic changes (new pagination API, dynamic rendering, SSG removal). While most individual changes are straightforward, the interconnected nature of pagination logic, architectural shift from static to dynamic generation, and new public API surface in lib/wordpress.ts warrant careful review.

Possibly related PRs

Suggested reviewers

  • youngbloodcyb

Poem

🐰 A rabbit hops through Docker's den,
Pagination posts now—ten, twenty, then!
From static shells to dynamic streams,
Fresh Russian branding fills the themes. ✨
Variables renamed, containers blessed—
This headless WordPress hop is best!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3abffe5 and 9d202ea.

⛔ Files ignored due to path filters (2)
  • app/favicon.ico is excluded by !**/*.ico
  • plugin/next-revalidate.zip is excluded by !**/*.zip
📒 Files selected for processing (20)
  • .env.example (1 hunks)
  • CLAUDE.md (1 hunks)
  • Dockerfile (1 hunks)
  • README.md (2 hunks)
  • app/api/revalidate/route.ts (1 hunks)
  • app/layout.tsx (5 hunks)
  • app/page.tsx (1 hunks)
  • app/posts/[slug]/page.tsx (2 hunks)
  • app/sitemap.ts (2 hunks)
  • components/nav/mobile-nav.tsx (1 hunks)
  • components/posts/post-card.tsx (0 hunks)
  • docker-entrypoint.sh (1 hunks)
  • dockerignore (1 hunks)
  • lib/wordpress.ts (5 hunks)
  • menu.config.ts (1 hunks)
  • next.config.ts (1 hunks)
  • plugin/README.md (1 hunks)
  • plugin/next-revalidate/README.txt (1 hunks)
  • plugin/next-revalidate/next-revalidate.php (1 hunks)
  • site.config.ts (1 hunks)

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 and usage tips.

@Feretj Feretj closed this Oct 22, 2025
@Feretj
Copy link
Author

Feretj commented Oct 22, 2025

Sorry made pull request to wrong repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant