Next.js · Junior · Question 50 of 75

What title does the page get with export const metadata = { title: 'Profile' } in the page and title: { template: '%s | Shop', default: 'Shop' } in the layout?

Explanation

title.template from the layout is applied to titles of child segments: %s is replaced with the page's title. default is used if a child segment doesn't set a title. This saves you from repeating the site name on every page.

Further reading

Problem with a question

Next.js · Junior · question 50

Test yourself

Take the Next.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz