Closed bronthulke closed 1 year ago
Hello @bronthulke
Thanks for your feedback.
Could you reproduce this example online?
Hey @ktquez, sorry for the delay but I have it up on a live site now where you can see it.
If you go to http://54.206.8.208:8089/ the default keywords (which are set in my index.html) are shown - that's the keywords ending in "tennis tournament app". For that home view (home.vue) I do have a set of meta in the vue file and the words are the SAME in there as in the index.html default file.
If you then navigate using the menus to get to Features > League Management, you will see that the keywords meta is updated to be a set ending with "tennis courts near me".
Then if you navigate to Contact Us, you'll see that the keywords stay the same (ending in "tennis courts near me") rather than resetting to the defaults that end in "tennis tournament app".
You'll also see that it's not picking up my default title and appending it to the end, instead it's appending "Vue App". I do have a default title set ("Str8 Sets Tennis | For Clubs, Players, Competitions") and that was working in my dev build but isn't working as expected in this production build.
I hope this is clear, it's hard to describe it succinctly :)
Thanks!
Just an update on this, the title thing turned out to be our issue (something was going wrong in the build), so it's only the default meta fallback issue that I still have :)
Hey @bronthulke, sorry for the delay. I managed to see the error.
I will do some tests, and soon as done I give you feedback here with the solution or a new fixed version.
@bronthulke I missed this issue, did you manage to solve it??
Hey @ktquez, it's still an issue and unfortunately I haven't even had a chance to dig in any deeper myself.
Having the same issue here, is anyone actively maintaining this? If yes, I'll try to fix this.
@ktquez I fixed this on my side, any tags that have been substituted will get reset on navigate. Open to discuss, whether this could be an intended feature.
Hi @Aryan3212, how are you? It would be an honor to receive your PR
Hey @ktquez I'm good. How are you? Just opened #104, do have a look, would love to get feedback.
On a side note, I'm having some trouble writing the test suites, I'm trying to render an App with some existing meta tags, with two children that have their own head
property. How do I go about doing this?
I'm hoping to use this plugin to set specific meta data (title, keywords, og: tags etc) on certain pages, but I want it to fallback to the defaults when you navigate to any page that does NOT specify tag data.
The problem is, it doesn't appear to reset the tags if a user moves to a page that has no overrides.
For example, in my main file I have this:
I have a view "tagged-view" that has this within it:
Note that I'm using the
id
attribute to do replacement of the tag, and that's working.If I go to "/" I see the default title ("My Test App") and default keywords ("standard keywords, more keywords").
Then if I click a router link to go to /tagged-view, I can see the title is now "My Special Page | My Test App", and the keywords have changed to "special keywords, different words".
However, if I then click a router link to go back to "/" I see that title has changed back to the default ("My Test App") but the keywords are still showing the customised version ("special keywords, different words'"). It only resets back to the defaults if I do a full page refresh.
So it seems as though the only way to have a deafult is to actually physically set the keywords etc (for ALL my meta tags) on every single page.
Is this a known/intended behaviour, or is there some config I can set to ensure it resets on every navigation?
Thanks :)