Frame & Light — Complete Project Guide
This file explains how to customize your Next.js photography template safely and quickly. It covers the necessary files and folders in this repository with practical instructions for editing content, layout, routes, styles, and assets.
Quick Start
1) Install and run
npm install
npm run dev
2) Build production
npm run build
npm run start
3) Useful scripts from package.json
npm run dev— local development servernpm run build— production buildnpm run start— run built sitenpm run lint— lint checksnpm run format— Prettier formatting
File & Folder Map (Necessary Areas)
These are the core folders you will edit most often.
| Path | Purpose | Customize Here |
|---|---|---|
src/pages |
Routes and page composition | Which sections appear on each page |
src/components/home-page |
Home sections | Hero, services, about, pricing, testimonial, featured blog, portfolio block |
src/components/blogs |
Blog listing + details UI | Cards, grids, sidebar, slider, previous/next navigation |
src/components/portfolios |
Portfolio listing + details UI | Portfolio cards, detail sections, form, previous/next navigation |
src/components/header |
Main header + mobile menu | Top navigation links and labels |
src/components/layout |
Global layout wrapper | Footer structure and site-wide layout behavior |
src/components/contact |
Contact info + form + map | Contact cards and form appearance |
src/data |
Markdown content source | Posts, projects, services, pricing, testimonials, teams, hero text |
src/lib |
Data loading helpers | How markdown is parsed and how categories/tags are generated |
src/styles/globals.css |
Global utility classes | Shared visual language (header, buttons, cards, spacing utilities) |
tailwind.config.js |
Theme tokens | Colors, breakpoints, container sizes, custom keyframes |
public/images |
Static assets | Replace hero, blog, portfolio, team, and brand images |
Important component subfolders
src/components/blogs/blog-detail— detail banner/content blocks for single blog pagessrc/components/portfolios/portfolio-detail— detail banner/content blocks for single portfolio pagessrc/components/common— reusable behaviors (for example split text animation)src/components/page-banner— top hero banners for internal pages
Pages & Routes
| URL | Page File | Main Components |
|---|---|---|
/home |
src/pages/home.js (re-exports src/pages/index.js) |
Home sections: hero, services, portfolio preview, about, pricing, testimonial, featured blog |
/about |
src/pages/about.js |
PageBanner, About, Services, Testimonial, Team |
/blog |
src/pages/blog/index.js |
Breadcrumb + blog list |
/blog/[slug] |
src/pages/blog/[slug].js |
Single blog content + previous/next |
/portfolio |
src/pages/portfolio/index.js |
Breadcrumb + portfolio list |
/portfolio/[slug] |
src/pages/portfolio/[slug].js |
Single portfolio content + inquiry form + previous/next |
/contact |
src/pages/contact.js |
Map + contact info card + contact form card |
/category/[slug] |
src/pages/category/[slug].js |
Blog posts filtered by category |
/tag/[slug] |
src/pages/tag/[slug].js |
Blog posts filtered by tag |
How data is loaded on pages
Most pages use getStaticProps and getStaticPaths with helper functions from
src/lib/items-util.js.
Primary navigation now points to /home. The route is provided by src/pages/home.js,
which reuses the same homepage implementation from src/pages/index.js.
getAllItems(type)reads markdown files fromsrc/data/{type}getItemData(slug, type)reads a single markdown file and returns frontmatter + content- Items are sorted by
datedescending when available
Content Model (Markdown Data)
Content is stored in markdown files under src/data. Keep slug/file names URL-safe
(lowercase with hyphens) because detail pages map directly to file names.
1) Blog posts: src/data/posts/*.md
---
title: 'Mastering Golden Hour Photography Tips'
date: '2024-03-15'
image: inspired.jpg
descriptionImg: 'single-image.jpg'
isFeatured: true
category:
- tips
- lighting
postTitle: ...
postDesc: ...
postAdditionalDesc: ...
singlePostTitle: ...
singlePostDesc: ...
icon: FaQuoteLeft
blockquoteText: ...
postExcerpt: ...
postTags:
- outdoor
- tutorial
---
Optional markdown body content...
2) Portfolio items: src/data/projects/*.md
---
title: 'Seaside Wedding Celebration'
category: 'wedding'
date: '2024-04-10'
image: 'brossia.jpg'
descriptionImg: '1.jpg'
excerpt: 'Wedding Photography'
location: 'Malibu, California'
clientName: 'Rachel & David Thompson'
completedDate: 'April 2024'
architectName: 'Marcus Chen'
squareUnits: '500+ photos'
additionDesc: 'HTML allowed with <br/>'
isFeatured: true
---
3) Services: src/data/services/*.md
---
title: 'Photo Shoot'
icon: 'AiOutlineCamera'
---
Service description text...
4) Pricing: src/data/pricing/*.md
---
id: 'pricing-item-01'
monthlyPlan: 'Mini Session'
annualPlan: 'Mini Package'
monthlyPrice: '$150'
annualPrice: '$350'
icon: 'AiOutlineCheckCircle'
monthlyExcerpt: ...
annualExcerpt: ...
monthlyPricingList:
- item
annualPricingList:
- item
---
5) Other data folders
src/data/heros— homepage hero slidessrc/data/contact— contact page text, email, phonesrc/data/testimonial— testimonialssrc/data/teams— team cardssrc/data/brands— brand logos/labels if used in brand section
Important naming note
The UI and routes now use Blog and Portfolio, but data folders are still
named posts and projects. This is expected in current code.
Images
- All static images live in
public/images. - Subfolders include
hero,posts,projects,team,logo,service, and more. - When replacing assets, keep expected filenames or update the related markdown/component references.
- Use optimized sizes to improve performance (especially hero and full-width images).
Where image names are referenced
- Blog cards/details: from
src/data/posts - Portfolio cards/details: from
src/data/projects - Hero: from
src/data/heros - Logo: header/footer components in
src/components/headerandsrc/components/layout/footer.js
Styling & Theme
Tailwind theme
Update design tokens in tailwind.config.js.
theme.extend.colors— brand colors such as primary, secondary, sky, etc.theme.screens— responsive breakpointscontainer— max width and padding behavior
Global utility classes
src/styles/globals.css contains shared component-like utility classes for header, buttons,
service cards, project cards, post tags, pricing card behavior, and animation helpers.
Section-level design changes
If you need to redesign a specific section, edit its component directly under
src/components/home-page, src/components/blogs, src/components/portfolios, etc.
Common Customization Workflows
Add a new blog post
- Create a new markdown file in
src/data/posts(for examplemy-new-post.md). - Add frontmatter fields used by cards/detail UI (title, date, image, category, tags, etc.).
- Add image files into
public/images/posts/my-new-post/(or your chosen pattern). - Run
npm run devand open/blog/my-new-postto verify.
Add a new portfolio item
- Create
src/data/projects/new-portfolio-item.md. - Fill frontmatter (title, category, image, location, client, etc.).
- Add portfolio images under
public/images/projects/new-portfolio-item/. - Check listing page
/portfolioand detail page/portfolio/new-portfolio-item.
Change homepage sections order
Open src/pages/index.js and reorder imported components in JSX.
This is the fastest way to alter homepage narrative flow.
Change menu labels/links
- Edit desktop links in
src/components/header/header-1.jsandheader-2.js. - Edit mobile links in
src/components/header/offcanvas-data.js. - If you add a new route, also create its page file in
src/pages.
Update contact details
- Edit
src/data/contact/contact-info.md. - For footer-specific details, also edit
src/components/layout/footer.js. - For map embed/location logic, edit
src/components/contact/google-map.js.
Build & Deployment Notes
- Run
npm run lintbefore production build. - Run
npm run buildand fix any compilation errors before deploy. - Static content pages are generated from markdown at build time.
next.config.jscurrently uses image loader settings withakamaiandpath: '/'.
Troubleshooting
Blog/portfolio page not found (404)
- Check markdown filename slug in
src/data/postsorsrc/data/projects. - Ensure links use
/blog/[slug]or/portfolio/[slug].
Images not appearing
- Confirm files exist in
public/imagesand names match frontmatter values exactly. - Check for path typos such as missing folder names or wrong extensions.
Category or tag filters not working
- Confirm
categoryandpostTagsarrays in blog frontmatter are populated. - Category/tag pages depend on
src/lib/getPostCategories.jsandsrc/lib/getPostTags.js.
Styles not updating
- Restart dev server after major Tailwind config changes.
- Verify classes are not dynamically constructed in unsupported ways.