Cyril Duchon-Doris
Cyril Duchon-Doris

Reputation: 13949

Adding semantic markup to a rails application / RDFa

I am surprised to see little information about this. I'd like to enhance my Rails webpages with semantic markup for use with Facebook/LinkedIn/Twitter and Search Engines.

Most things I find when typing "RDFA ruby/rails" are actually processors that can read/parse graphs and schemas, but not actually assist including semantic markup in a website.

I am wondering how people actually do this ? By passing RDFa in html_options in content_tag ? By manually adding this in the HTML views ?

I actually found this gem that seems to do that, but it's not on github, and the page seems to date from the pre-bootstrap era where people wrote raw html (if I may). There is no indication of activity on this gem, no single date on that page, and the download seems to be broken.

Is it something so uncommon for Rails websites to have semantic markup ??

EDIT :

Using Rails 5 and Mongoid, and will be using Algolia soon

Upvotes: 0

Views: 136

Answers (1)

Loqman
Loqman

Reputation: 1580

Actually there are some gems that will do what you want, like green_monkey and item, but unfortunately they are not actively maintained:

https://github.com/Paxa/green_monkey

https://github.com/lassebunk/item

also if you want to parse or extract microdata from html files you can use mida:

https://github.com/LawrenceWoodman/mida

and the meta-tags gem looks interesting and worth checking out :

https://github.com/kpumuk/meta-tags/

Upvotes: 1

Related Questions