How to get dynamic meta tags in head using polymer?

314 views
Skip to first unread message

Ammar

unread,
Dec 3, 2015, 4:50:18 PM12/3/15
to Polymer
I have a polymer node site that I've been working on and can't figure out how to include dynamic meta tags so that my description changes.  I don't want to use this only for the description but also to set data for og:title, og:url,..etc. for facebook.

For example:

<!doctype html>

<html>
  <head>
    <meta name="description" content="description goes here" />
    <meta property="og:title" content="title"/>
  </head>
  <body>
    <group-pages id="grouppages" is="dom-bind"></group-pages>
  </body>
</html>

grouppages sets the data and uses a services to populate the page based off the url but what I can't find out is how to change the meta tags.  I can do it with jquery but that won't work for SEO or when you share a page on facebook?

Anyone have any ideas?  Is there a polymer component for this?

m...@clayto.com

unread,
Apr 22, 2016, 2:43:26 PM4/22/16
to Polymer
I'm interested in a solution to this as well.  The context for me is that I'm attempting to build a component that would be used by a few dozen different applications to apply a common theme to all of them.

  <body>
    <our-common-theme>
      <div>All the content</div>
    </our-common-theme>
  </body>

The one big catch is that the <our-common-theme> component must inject some meta tags the parent DOM's head.  We've had a hard time getting that working with Polymer.

justinon...@gmail.com

unread,
Apr 28, 2016, 7:40:02 PM4/28/16
to Polymer
I'm interested in a solution to this too! I've found this: https://github.com/zacharytamas/page-title for the "title" tag..but it doesn't seem to be compatible w/ version 1.0 of Polymer.
Reply all
Reply to author
Forward
0 new messages