kpumuk / meta-tags

Search Engine Optimization (SEO) for Ruby on Rails applications.
MIT License
2.73k stars 275 forks source link

Add support for alternate links (RSS, Atom) #64

Closed pnull closed 9 years ago

pnull commented 10 years ago

I need to add tags like:

<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.example.net/feed.rss" />

to a blog index page. Unfortunately, this GEM isn't able to do that as far as i can see.

lulalala commented 9 years ago

In our fork https://github.com/GoodLife/meta-tags/tree/flexible-alternate, you can use the following to achieve what you want:

  set_meta_tags(
    alternate: [
      {href:"http://www.example.net/feed.rss", type:"application/rss+xml", title:"RSS"},
    ],
  )
To maintainer:

the current alternate logic is only limited to hreflang. However alternate can also be used at many places, such as mobile versioned pages (https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls#annotation-in-the-html)

So can you consider my fork and see if see if you are happy with the syntax? It is not compatible with previous versions, but I think that can be fixed.

kpumuk commented 9 years ago

Will this work for you: 6c0d4fa6e9c4a516bcabc7e697f9d6ba8805f550 ?

pnull commented 9 years ago

:+1:

lulalala commented 9 years ago

:+1: thanks!