Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): avoid duplicate titleTemplate #6296

Merged
merged 1 commit into from
Aug 2, 2022
Merged

fix(nuxt): avoid duplicate titleTemplate #6296

merged 1 commit into from
Aug 2, 2022

Conversation

harlan-zw
Copy link
Collaborator

πŸ”— Linked issue

Related PR: vueuse/head@1382c43

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (VERY MINOR) (fix or feature that would cause existing functionality to change)

πŸ“š Description

When working on #6293, I updated the @vueuse/head package to get the dedupe fix.

In updating, I noticed that all titles had duplicate template processing. For example Home - My Title, became Home - My Title - My Title. This was due to @vueuse/head introducing its own titleTemplate feature.

I figured the best course of action would be to adopt the native titleTemplate logic which, as far as I tested, includes the same feature set.

All seems to work well, however, there is one very minor "breaking" change. In the documentation, it recommended setting titleTemplate to undefined to disable it. This is not possible with these changes, so the doc is updated to use null instead. The @vueuse/head package ignores null values so we need to cast it to an empty string.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Aug 2, 2022

βœ… Deploy Preview for nuxt3-docs ready!

Name Link
πŸ”¨ Latest commit 36c7e35
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62e905b45645380008773bc6
😎 Deploy Preview https://deploy-preview-6296--nuxt3-docs.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@pi0 pi0 changed the title feat(head): migrate to @vueuse/head titleTemplate fix(nuxt): avoid duplicate titleTemplate Aug 2, 2022
@pi0
Copy link
Member

pi0 commented Aug 2, 2022

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants