Rails structured data
The aim of this project is to provide some basic rails helpers to render structured data inside web-pages.
⚠️ This gem is under active development.
Basic information
-
The main goal right now is to provide meta information inside web-pages for search engines. We are going to use this page as a reference.
-
The prefered format is JSON-LD, although for certain features we might use something else (like microdata or RDFa).
How to install
Add the structured_data
gem to your Gemfile
. Be sure to specify the current version!
gem 'structured_data', '~> 0.1.1'
Usage
Take a look at this example:
<%= structured_data_tag({ '@context' => 'http://schema.org' }) %>
The code above renders this html code:
<script type="application/ld+json">{"@context":"http://schema.org"}</script>
There will be more features in the next versions!
Contributing
Feel free to contribute by creating issues with idea-proposals and/or pull requests.
Special thanks to: