Documentation
Personalizing Your Next.js Blog
On this page
In this second part of our tutorial series, we'll be personalizing the minimalist blog we created using Next.js 14 and Wisp CMS.
If you prefer to read, you can find accompanying notes to the video tutorial below.
Prerequisites
- Completed Part 1 of the tutorial series
- Your blog running locally on your machine
Step 1: Understanding the Folder Structure
- Open your project in your preferred code editor
- Navigate to the root folder
- Explore the following key directories:
src
: Contains all the source codesrc/app
: Contains the routing structure and page componentssrc/components
: Houses reusable React componentssrc/lib
: Contains utility functions and configurations
Step 2: Customizing the About Page
- Navigate to
src/app/about/page.tsx
- Edit the content using Markdown syntax
- To change the profile picture:
- Add your image to the
public/images
folder - Update the image path in the Markdown content
- Add your image to the
Step 3: Updating Site Configuration
- Open
src/config.ts
- Modify the following fields:
siteConfig.title
siteConfig.description
siteConfig.copyright
- Alternatively, update these values in your
.env
file:NEXT_PUBLIC_SITE_TITLE
NEXT_PUBLIC_SITE_DESCRIPTION
NEXT_PUBLIC_COPYRIGHT
Step 4: Adding a New Page
- Create a new folder in
src/app
(e.g.,favorite-products
) - Add a
page.tsx
file in this new folder - Copy the basic structure from another page and modify as needed
- Update the metadata for SEO purposes
Step 5: Updating the Navigation
- Locate the header component (usually in
src/components/Header.tsx
or similar) - Add a new navigation item for your new page:
Step 6: Exploring React Components
- Navigate to the src/components folder
- Examine existing components to understand their structure
- Modify components as needed to fit your design preferences
Step 7: Understanding Next.js App Router
- Review the src/app folder structure
- Note how each folder represents a route in your application
- Understand that page.tsx files define the content for each route
Step 8: Basic SEO Optimization
- In each page.tsx file, locate the metadata object
- Update the title and description fields for better SEO:
Step 9: Customizing the Main Page
If you want to change the main page from the blog list:
- Move the current src/app/page.tsx to another folder (e.g., src/app/blog/page.tsx)
- Create a new src/app/page.tsx with your desired content for the homepage
Step 10: Learn More
Getting the base blog template up is only the starting point - you can build amazing things with this as a starting point.
Here's what you can build on top of this base template:
- style the site to your preference
- add custom interactive components
- add call-to-actions and forms
- turn it into a SaaS
To be able to do that you will probably have to learn more about:
Conclusion
You've now learned how to:
- Customize your blog's content and appearance
- Add new pages to your Next.js application
- Work with React components
- Implement basic SEO practices
Coming Up Next
In the next part of this series, we'll cover:
- Deploying your blog to a live server
- Setting up custom domains
Stay tuned for the final part of our tutorial series!