Editing the content — Denzel Next.js
All the words and images of this Next.js template live in src/content/, in plain TypeScript files you edit while npm run dev shows the result.
No CMS is needed: text goes between quotes and items are separated by commas. If you would rather manage content in Sanity, Payload, Strapi or Directus, see Using a headless CMS.
src/content/ site.ts name, title, description, domain, logo, menu, socials, search, sidebar, footer, card labels pages/home.ts Home's title and description, and the posts it picks pages/blog.ts the Blog page and the labels of the category, author and post pages pages/not-found.ts the 404 page collections/*.ts posts, categories and authors routes.ts the URL of every page types.ts the fields each kind of item hasNot sure which file holds a piece of text? The page maps label every section of every page with the file that renders it.
Your details first
Section titled “Your details first”src/content/site.ts holds what appears on every page:
| Export | Shown where |
|---|---|
site.name |
The browser title suffix (“Business | Denzel”), share cards, the name of the sidebar’s About box and the footer’s first column for screen readers |
site.title |
The site’s default browser title |
site.description |
Search results and share cards (the site’s default description). It describes the template: write yours. |
site.url |
Set this to your domain before publishing. Canonical links, share links, sitemap.xml and robots.txt are built from it. |
logo |
The logo file (/images/logo.svg) and its name for screen readers, in the header, the menu, the sidebar and the footer (Making it look like your brand) |
navigation |
The header’s seven links (and the menu on phones and tablets): Home, All Post, the four categories and Author, which opens the first author’s page (/author/anderson) |
socials |
The four social links of the header, the menu, the sidebar’s About box and the footer (the demo’s open the networks’ home pages) |
search |
The search button’s label (“Search All”), the field’s placeholder, “No results found”, and the menu button’s two labels (“Menu”, “Close”) |
sidebar |
The About box’s text and background, the Recent posts and the Explore Topics categories (below) |
footer |
The footer: its text, the e-mail address, the two posts under “Celebration” (posts), the newsletter box’s texts (newsletter) and the copyright line (copyright, where {year} becomes the current year) |
labels |
“View All” beside the titles of Editor’s Pick, Trending, Related Posts and More Articles by |
The demo’s e-mail (hello@example.com) is a placeholder: replace it. A social link’s name picks its icon and must be
one of facebook, twitter, instagram and pinterest; point the links to your own profiles and remove the ones you
don’t use.
The site’s name appears in many places: site, the logo, the breadcrumbs (“Denzel / Blog / …” in pages/blog.ts), the
page descriptions, the copyright line (“© {year} Denzel. Theme by Marcframe.”) and the share image’s description in
src/lib/meta.ts. Search src/ for “Denzel” to find them all.
Page copy
Section titled “Page copy”There is one file per page in src/content/pages/. Change the text between the quotes, keeping the field names: the
sections read them by name. Apostrophes are safe inside double quotes, and the demo uses both ’ and the typographic ’.
| File | What it holds |
|---|---|
home.ts |
Home’s browser title and description (meta; the title is used whole, without “ | Denzel”), the slider (slider), Editor’s Pick (picks), Trending (trending) and Latest (latest: its title, count, how many of the newest posts show: 8, and the “View More” button) |
blog.ts |
The Blog page (blog: its title and description; its heading is read by screen readers only), the category pages (category: the breadcrumb, the description pattern, the note for an empty category), the author pages (author: the breadcrumb, “Articles by:”, the names of the social links, the description pattern, the note for an author without posts) and the post pages (post: the breadcrumb, “Related Posts” and “More Articles by”, with count, how many posts each shows: 3) |
not-found.ts |
The 404 page: its browser title and description, the illustration, “Something’s wrong here…”, the text and “Return to Homepage” |
In the description patterns, {name} becomes the category’s or the author’s name.
Collections
Section titled “Collections”src/content/collections/ holds the lists the site builds pages and sections from:
| File | What it feeds |
|---|---|
posts.ts |
Blog (every post), one page per post at /blog/<slug>, Latest on Home (the eight newest), the category and author pages, Related Posts and More Articles by under a post, the search, and the picks named by slug (Home, the sidebar, the footer) |
categories.ts |
One page per category at /category/<slug>, the category label of every card, the sidebar’s Explore Topics and the search |
authors.ts |
One page per author at /author/<slug>, the author of every card (with a photo on the larger cards and the post page) and the search |
Posts are sorted by date, newest first, everywhere they are listed: Blog, Latest, the category and author pages,
Related Posts and More Articles by. Two posts of the same date keep the order of the file. So a new post with today’s date
shows first by itself, wherever you put it in posts.ts. Categories and authors keep the order of their files.
Blog lists every post on one page, without “load more”. The category and author pages list every post of theirs.
Home, the sidebar and the footer pick posts by slug
Section titled “Home, the sidebar and the footer pick posts by slug”These blocks show the posts you name, not the newest ones:
| Block | Field | In the demo |
|---|---|---|
| The sliding row under the header | slider.slugs in src/content/pages/home.ts |
6 posts |
| Editor’s Pick | picks.lead (the large post) and picks.slugs (the two small ones) in home.ts |
3 posts |
| Trending | trending.columns in home.ts: each column a lead and two slugs |
2 columns of 3 |
| The sidebar’s Recent | sidebar.recent.posts in src/content/site.ts |
4 posts |
| The sidebar’s Explore Topics | sidebar.topics.categories in site.ts (category slugs) |
4 categories |
| The footer’s “Celebration” | footer.posts.slugs in site.ts |
2 posts |
When you add, rename or delete a post, check these lists. A slug in Editor’s Pick or Trending that matches no post stops
the build (Home: no post "<slug>"). A slug that matches nothing in the slider, Recent, Explore Topics or the footer is
skipped: the block shows one item fewer. Latest needs nothing: it always shows the newest posts.
Explore Topics shows each category’s photo, its name and its number of posts (“8 Post”; the word is
sidebar.topics.countLabel), counted from the posts. How the sidebar gets its lists is in
Pages and sections.
Adding a post
Section titled “Adding a post”Copy an existing entry, paste it in posts.ts, and change the values:
{ "slug": "five-habits-of-calm-editors", // the URL: /blog/five-habits-of-calm-editors "title": "Five Habits of Calm Editors", // the cards, the page's title and its browser title "excerpt": "Small daily habits that keep a newsroom steady.", // under the title on the larger cards and the lists "category": "business", // a category's slug "author": "annabella", // an author's slug "date": "2026-11-02", // shown as "Nov 2, 2026"; the lists sort by it "image": { "src": "/images/post-five-habits-of-calm-editors.jpg", "alt": "…" }, // the cards' photo and the page's cover "body": [ // the article: rich text, below { "type": "paragraph", "text": "First paragraph." }, { "type": "heading", "level": 3, "text": "A heading" }, { "type": "paragraph", "text": "Another paragraph." } ]}The quotes around the field names come from the way the files are generated; they are optional in TypeScript, so keep them or leave them out.
category and author are slugs: write them exactly as in categories.ts and authors.ts. A post whose category or
author doesn’t exist still builds, but its card shows the slug as the name and links to a page that doesn’t exist.
A post page shows the breadcrumb (Denzel / Blog / its category), the title, the author with a photo and the date, the cover photo and the text. Then come Related Posts (up to three other posts of the same category, newest first) and More Articles by the author (up to three of the author’s other posts); each is left out when there is none. A post’s search description is its title followed by its first paragraph, cut at 160 characters.
Adding a category
Section titled “Adding a category”{ "slug": "travel", // the URL: /category/travel; posts name it in "category" "title": "Travel", // the page's title, the card labels, Explore Topics "description": "…", // under the title on the category page "image": { "src": "/images/category-travel.jpg", "alt": "…" } // beside the title, and round in Explore Topics; or null}The category gets its page and its place in the sitemap automatically. To show it in the menu, add a link to
navigation in site.ts; to show it in Explore Topics, add its slug to sidebar.topics.categories.
Adding an author
Section titled “Adding an author”{ "slug": "jane", // the URL: /author/jane; posts name it in "author" "name": "Jane", // the cards, the page's title "bio": "…", // under the name on the author page "avatar": { "src": "/images/author-jane.jpg", "alt": "…" }, // round on the author page and beside the larger cards; or null "social": { "facebook": "https://…", "twitter": null, "instagram": null } // null hides that icon}The header’s “Author” link opens one author’s page (/author/anderson in navigation): point it at yours.
The default category and author
Section titled “The default category and author”categories.ts ends with “Uncategory” and authors.ts with “Admin”: the defaults of the original design, without posts
or a photo. They have pages (/category/uncategory, /author/admin) that say “No posts in this category yet.” and “No
posts by this author yet.”, and they are in the sitemap, but nothing links to them and the search leaves them out while
they have no posts. Delete them if you don’t need them.
Removing an item
Section titled “Removing an item”Delete the entry. Its own page and its sitemap entry disappear on the next build. Before you remove a post, a category or an author, check the places that name it: Home’s picks, the sidebar, the footer and the menu (above), and the posts that name the category or the author.
What each field means
Section titled “What each field means”src/content/types.ts is the reference: it lists every field, which can be null, and a comment for the ones that are
not obvious. Your editor shows the same information while you type.
Rich text: the posts
Section titled “Rich text: the posts”A post’s body is a list of blocks:
body: [ { "type": "paragraph", "text": "Cryptocurrency markets have been characterized by …" }, { "type": "heading", "level": 3, "text": "1. **Regulatory Landscape and Market Sentiment**" }, { "type": "list", "ordered": false, "items": [ "**Uncertainty and Speculation**: Cryptocurrency prices often react to …", "**Market Reaction**: Regulatory crackdowns …" ] }, { "type": "heading", "level": 4, "text": "2. **Descriptive and Diagnostic Analytics**" }, { "type": "list", "ordered": true, "items": [ { "text": "**Enhanced Customer Experience**", "ordered": false, "items": [ "**Personalization**: …", "**Convenience**: …" ] } ] }]- Paragraphs are plain text; words between double asterisks are bold (
**…**). - Headings take a
levelfrom 2 to 6. Levels 2 and 3 are drawn in the larger heading style (22 px), levels 4 to 6 in the smaller one (18 px). Bold words inside a heading are drawn heavier. - Lists are bulleted (
"ordered": false) or numbered ("ordered": true). An item is a line of text, or an object with itstextand a list nested under it (orderedanditems), one level deep: the demo nests bullets under numbered items.
There are no italics, links or images inside the text.
Images
Section titled “Images”- Put the file in
public/images/. - Refer to it in the content as
/images/<file>(the path starts atpublic).
Sizes and formats are handled for you: pages use next/image, which serves a scaled, modern format per device. The
download’s placeholders show the size of each demo photo; use photos at least as large:
| Photos | Demo size | Frame |
|---|---|---|
A post’s image |
1600 × 1067 (some taller) | 734 : 406 on its page; 477 : 430 (Editor’s Pick, large), 357 : 267 (Trending, large), 25 : 16 (the grid cards), square on the lists (150 px), 80 px squares in the slider, Trending and the footer, 60 px round in Recent |
A category’s image |
800 × 533 | 336 : 234 beside the title (the full width on phones), 52 px round in Explore Topics |
An author’s avatar |
120 × 120 | 100 px round on the author page, 42 px on a post page, 32 px on the larger cards |
The 404 illustration (image in not-found.ts) |
800 × 600 | 4 : 3, up to 800 px wide |
The About box’s background (sidebar.about.background in site.ts) |
360 × 232 (PNG) | Behind the logo, the text and the socials |
Photos in a fixed frame are cropped to fill it, so a photo of other proportions works, but you lose the edges the frame cuts. The same post photo appears in frames of many shapes, so keep the subject in the middle.
Every photo comes with a short description for screen readers and search engines: alt in { src, alt }. Write one for
each photo you change (an empty alt: "" marks a picture as decoration, like the About box’s background).
Three things sit outside the content because browsers and social networks ask for them by name:
| File | What it is |
|---|---|
src/app/icon.svg |
The icon in the browser tab: the round mark, dark, white in a dark browser theme |
src/app/apple-icon.png |
The icon on a phone’s home screen (180 × 180) |
public/opengraph-image.png |
The picture shown when someone shares a link (2400 × 1260; 1200 × 630 or larger) |
The share image’s description for screen readers is shareImage.alt in src/lib/meta.ts, next to its size: change
width and height there if your image has another size, and write a description of your own (the demo’s calls the
site a template). Every page uses this image when shared, except a post, which shares its own cover photo.
Text that is not in content/
Section titled “Text that is not in content/”Almost every word is content, including the newsletter’s messages (site.ts). The few interface words that never change
per site live in the code:
- “Main” (the menu’s name for screen readers) in
src/components/site/Header.tsx; - “Breadcrumb” in
src/design-system/components/layout/Breadcrumbs.tsx, and “Close search” and “Clear” insrc/design-system/components/navigation/SearchDialog.tsx(names for screen readers); - the date format of the cards (“Sep 14, 2023”) in
src/lib/format.ts; - the page’s language,
lang="en", insrc/app/layout.tsx.
Search for the word and you will find it.
After editing
Section titled “After editing”npm run buildA successful build means every content file has the fields it needs, every post Home picks exists and every page still
renders. It doesn’t check that the images exist, that a post’s category and author exist, or that links written as text
("/category/business") lead somewhere: click through the site once with npm start after big changes. See
Going live for the rest of the checklist.