-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Description
Feature request
The problem I have right now is as follows:
- I use the next.js build pages as fragments in another parent page (nginx ssi includes)
- Parent Page has a title tag <title>Something</title>
The issues come from https://github.com/zeit/next.js/blob/9320d9f006164f2e997982ce76e80122049ccb3c/client/head-manager.js#L41 - Issue 1. If I do not specify the title in my fragment, the title of the parent page is overwritten with empty string
- Issue 2. If I do specify the title in my fragment, the title of the parent page is overwritten with the title from the fragment, and another title tag is added to the head (with next-head class).
- Issue 3. Parent page already has , the fragment adds its own <meta charset="UTF-8" class="next-head> again.
Describe the solution you'd like
I need a way (for example a config option) to disable headManager.
Describe alternatives you've considered
Currently I have the following solution, I set the title in the fragment to be exactly the same as in the parent page, and in the server before sending the response I delete the extra title and meta tag.
The problem comes when I need to include the same fragment in different pages with different titles. At the moment I add the titles as query string parameter when including the fragment.
But this is cumbersome and there should be easier solution to overwrite the default head manager behaviour.
Metadata
Metadata
Assignees
Labels
No labels