Skip to content
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

Support for other meta tags #4

Open
t4t5 opened this issue Mar 2, 2015 · 16 comments
Open

Support for other meta tags #4

t4t5 opened this issue Mar 2, 2015 · 16 comments

Comments

@t4t5
Copy link

t4t5 commented Mar 2, 2015

This is a great little nifty library! I'm currently using it on https://www.ludu.co together with Prerender.io in order not to screw up SEO with Ember. :)
Do you have any plans on extending it to support for example description tags or Facebook's open graph tags? In my case, I would love to be able to set the og:image based on the model's image for example.

@kimroen
Copy link
Owner

kimroen commented Mar 3, 2015

I don't have any specific plans to do this, but I can see the value and really like the idea! Seems doable, although maybe a little brittle (the way it works at the moment is slightly brittle as well, especially considering the changes coming up in Ember, with Fastboot and everything).

How would you like it to work in your app, API wise? What kind of hooks do you envision needing?

@t4t5
Copy link
Author

t4t5 commented Mar 4, 2015

I haven't actually looked at your code to be honest, but it seems to work fine right now and it just makes a lot of sense to put that stuff as values on the route-level as you have done.
What I see as mandatory for every page is a title, description and image. It would be nice to be able to just set these three simple values and let the addon automatically set the necessary meta tags, OpenGraph tags, Twitter card tags... etc.
Fits well with the ember philosophy of reducing boiler-plate code too!

@kimroen
Copy link
Owner

kimroen commented Mar 8, 2015

Oh, I get what you're saying, I was just wondering how you would like it to work when you use it in your app!

Right now we have the two hooks, titleToken and title that are available on all routes. These would need to be more generic. Given that you can define any number of tags you want, probably with different kinds of needs, we'll nee to rework how things work.

For instance, descriptions probably don't need the bubbling behavior, it should just use the description defined in the leafmost route, and the same thing probably goes for things like images.

Should you define those three things (title, description and image), and then specify which meta tags you want, or should you specify all of them independently? How can we make that clear? What about more obscure tags, like the tags google analytics wants for ecommerce-sites, for instance?

At first glance, it seems that a lot of thought will be required to come up with something that is flexible enough to handle these things.

I'm not concerned about the implementation - defining the hooks is the hard part here.

I'll give it a think, but let me know if you have some insights or ideas :)

@e-karma
Copy link

e-karma commented Mar 17, 2015

Hi @kimroen, thanks for making this! It's the best thing I could find so far when it comes to doing SEO. From the sounds of things, you seem interested in improving/expanding this Addon as good as can be and I know enough about ember & have digital MKTG experience to provide some suggestions. If this was of interest, let me know! I'm available to chat via email/skype/screenhero the next few days.

@edborden
Copy link

+1 for more tags options! Description, especially.

@kimroen
Copy link
Owner

kimroen commented Mar 24, 2015

Again, ideas for how you would want this to look during use would be really helpful!

I have some thoughts, but would love some more perspective.

@e-karma
Copy link

e-karma commented Mar 24, 2015

Following the model that liquid-fire has setup would be ideal from my perspective.

By that I mean having minimally all Meta/Title inputs for the entire app on one page that could be appended invisibly(addon style) to the router.js file structured in JSON-API format?
{
route1: {
title:
meta-description:
},
route2: {
title: ....etc etc.
}
}

@blimmer
Copy link
Contributor

blimmer commented Mar 26, 2015

I like the idea, but I think it's another add-on, not this library. We have a RouteMetaMixin that is used for exactly this purpose. Here's the source if you'd like to check it out. Yeah, yeah it's CoffeeScript - we're migrating to ES2015 over time.

This add-on is nice and simple just for handling the page title. Perhaps a good starting place would be forking this library and changing the name if that's the kind of functionality you're wanting.

@kimroen
Copy link
Owner

kimroen commented Mar 26, 2015

@blimmer I agree that it would probably be a separate library. Thanks for sharing!

Oh, and I don't mind CoffeeScript ;) (kimroen/ember-cli-coffeescript)

@blimmer
Copy link
Contributor

blimmer commented Mar 26, 2015

We're using it! Thanks for maintaining that library, it's been totally invaluable as we migrate our global app to CoffeeScript.

@edborden
Copy link

ember-cli-document-title + RouteMetaMixin looks like a great combo. You should release RouteMetaMixin as it's own add-on!

@j15e
Copy link

j15e commented Apr 21, 2015

Hi, I just made an add-on working with any other meta (& title) for my own use :

https://github.com/didacte/ember-meta-meta

I do not deal with nesting tokens, you could deal with it in your app or make a pull request to add this feature.

@e-karma
Copy link

e-karma commented Apr 21, 2015

Fantastic addition! Thanks for sharing. I just installed and it works
exactly as advertised.

On Tue, Apr 21, 2015 at 10:29 AM, Jean-Philippe Doyle <
notifications@github.com> wrote:

Hi, I just made an add-on working with any other meta (& title) for my own
use :

https://github.com/didacte/ember-meta-meta

I do not deal with nesting tokens, you could deal with it in your app or
make a pull request to add this feature.


Reply to this email directly or view it on GitHub
#4 (comment)
.

@kimroen
Copy link
Owner

kimroen commented Apr 22, 2015

@j15e That's very cool - thanks for sharing!

@ronco
Copy link

ronco commented Apr 23, 2015

@blimmer told me about the interest in my RouteMetaMixin.

I've finally addon'd it as ember-cli-meta-tags converting it to javascript in the process. I also eliminated the lodash dependency we had when we were using it internally and added several tests.

I see @j15e has developed an alternate one-stop solution which looks great too.

@hoIIer
Copy link

hoIIer commented Oct 23, 2015

@blimmer Yeah, yeah it's CoffeeScript - we're migrating to ES2015 over time. Why are you apologizing for using coffeescript? I find the argument that it is now antiquated due to es6/babel/etc to be misleading and highly subjective. Coffeescript has been and remains a powerful tool if you know how to use it AND you are productive with it (I know many that are). You should never use a language/framework/tool/etc strictly because "everyone else is"... /endrant

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

No branches or pull requests

8 participants