-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can you remove a parent meta value? #288
Comments
Unfortunately this is not possible. Do you have a suggestion how this would work? Eg currently vue-meta works by deepmerging all the metaInfo objects of the components on a page, which means by design that adding/overwriting works but deleting wont unless we introduce a special case of |
@pimlie Not sure whether that would add too much complexity 🤔 |
I think this should work by ignoring source when |
@pimlie I'd probably tend to use |
Is |
@pimlie hmm. good question, don't know by heart. hm.. couldn't we use |
@manniL The only problem I have with |
@pimlie Do we have to distinguish between |
It's possible I don't understand everything in this lib, but couldn't we just introduce functions or something vs magic values? To me it would make a little more sense to call removeMeta(something) and resetMeta(something) vs setting a value to null, false, etc.. |
Hmm, maybe its code style preference but @hecktarzuli The problem with that is where are those functions defined and when are they called? If you have multiple branches with components which define metaInfo then vue-meta will merge all the metaInfo's into one single object. Are those functions called after all the merging has taken place or immediately when a parent and child are merged? And does it call both parent and child functions or only the one of the child? I agree that having functions is nicer but it complicate things and for vue-meta v3 we will probably refactor everything from the ground up anyway. So therefore using null, false is a quick and easy solution for now :) |
This issue has been closed as changes for it are included in the v2 release candidate. Please help us testing the release candidate and report any follow-ups in a new issue |
We'll have to check it out, thank you! |
Really a question, not an issue. I set canonical at the App.vue level (root) but would like to remove the tag under certain conditions in child comps (like when we set something to noindex,nofollow).
Is there any way for a child comp to remove the parent meta tag? It seems like vmid would REPLACE it, but I'd like to totally nuke it. I'd like to not use any trickery via Vuex and would like to stay in vue-meta land if possible :)
The text was updated successfully, but these errors were encountered: