All Projects → dogweather → schema-dot-org

dogweather / schema-dot-org

Licence: MIT license
Validated structured data for websites

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to schema-dot-org

seomate
SEO, mate! It's important. That's why SEOMate provides the tools you need to craft all the meta tags, sitemaps and JSON-LD microdata you need - in one highly configurable, open and friendly package - with a super-light footprint.
Stars: ✭ 31 (-26.19%)
Mutual labels:  seo, schema-org, json-ld
HugoStructuredData
Collection of structured data snippets in Google preferred JSON-LD format, with support for Hugo
Stars: ✭ 33 (-21.43%)
Mutual labels:  seo, json-ld, structured-data
schema-and-structured-data-for-wp
Creating the best Structured Data and Schema plugin for WordPress
Stars: ✭ 66 (+57.14%)
Mutual labels:  seo, schema-org, structured-data
React Structured Data
React Structured Data provides an easy way to add structured data to your React apps
Stars: ✭ 120 (+185.71%)
Mutual labels:  seo, schema-org, json-ld
wagtail-metadata-mixin
🔍 OpenGraph, Twitter Card and Schema.org snippet tags for Wagtail CMS pages
Stars: ✭ 42 (+0%)
Mutual labels:  seo, schema-org
Next Seo
Next SEO is a plug in that makes managing your SEO easier in Next.js projects.
Stars: ✭ 4,149 (+9778.57%)
Mutual labels:  seo, json-ld
All In One Seo Pack
All in One SEO Pack plugin for WordPress SEO
Stars: ✭ 281 (+569.05%)
Mutual labels:  seo, schema-org
Jekyll Seo Tag
A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content.
Stars: ✭ 1,226 (+2819.05%)
Mutual labels:  seo, json-ld
The-SEO-Framework-Extension-Manager
A WordPress plugin that manages extensions for The SEO Framework.
Stars: ✭ 64 (+52.38%)
Mutual labels:  seo, schema-org
The Seo Framework
The SEO Framework WordPress plugin.
Stars: ✭ 329 (+683.33%)
Mutual labels:  seo, schema-org
Gatsby Advanced Starter
A high performance skeleton starter for GatsbyJS that focuses on SEO/Social features/development environment.
Stars: ✭ 1,224 (+2814.29%)
Mutual labels:  seo, schema-org
Craft Seomatic
SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
Stars: ✭ 135 (+221.43%)
Mutual labels:  seo, json-ld
Structured Data Json Ld
Collection of structured data snippets in Google preferred JSON-LD format.
Stars: ✭ 157 (+273.81%)
Mutual labels:  seo, json-ld
nuxt-netlify-lambda-starter
🛠️ SEO-friendly website starter backed by Netlify lambda functions in a simple, friendly repo
Stars: ✭ 60 (+42.86%)
Mutual labels:  seo, json-ld
really-rich-results
RRR makes structured data for WordPress really rich, and really easy.
Stars: ✭ 21 (-50%)
Mutual labels:  seo, schema-org
Seomatic
DEPRECATED A turnkey SEO implementation for Craft CMS 2.x that is comprehensive, powerful, and flexible
Stars: ✭ 366 (+771.43%)
Mutual labels:  seo, json-ld
Json Silo
Contextual data silo for the IoT and Smart Spaces. We believe in an open Internet of Things.
Stars: ✭ 10 (-76.19%)
Mutual labels:  schema-org, json-ld
Structured Data Testing Tool
A library and command line tool to help inspect and test for Structured Data.
Stars: ✭ 34 (-19.05%)
Mutual labels:  schema-org, json-ld
svelte-seo
Optimize your website for search engines and social media with meta tags, Open Graph, and JSON-LD.
Stars: ✭ 257 (+511.9%)
Mutual labels:  seo, json-ld
Seotools
SEO Tools for Laravel
Stars: ✭ 2,406 (+5628.57%)
Mutual labels:  seo, json-ld

Gem Version Maintainability

SchemaDotOrg

Let's create Structured Data with correct syntax and semantics, every single time. Good structured data helps enhance a website's search result appearance.

Google Search works hard to understand the content of a page. You can help us by providing explicit clues about the meaning of a page . . .

Usage

Let's say you have a Rails app. If you put this in a controller:

@public_law = Organization.new(
  name:             'Public.Law',
  founder:           Person.new(name: 'Robb Shecter'),
  founding_date:     Date.new(2009, 3, 6),
  founding_location: Place.new(address: 'Portland, OR'),
  email:            '[email protected]',
  url:              'https://www.public.law',
  logo:             'https://www.public.law/favicon-196x196.png',
  same_as: [
    'https://twitter.com/law_is_code',
    'https://www.facebook.com/PublicDotLaw'
    ]
  )

...and this in a template:

<%= @public_law %>

...you'll get this in the HTML:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Organization",
  "name": "Public.Law",
  "email": "[email protected]",
  "url": "https://www.public.law",
  "logo": "https://www.public.law/favicon-196x196.png",
  "foundingDate": "2009-03-06",
  "founder": {
    "@type": "Person",
    "name": "Robb Shecter"
  },
  "foundingLocation": {
    "@type": "Place",
    "address": "Portland, OR"
  },
  "sameAs": [
    "https://twitter.com/law_is_code",
    "https://www.facebook.com/PublicDotLaw"
  ]
}
</script>

Strong typing is at work here. SchemaDotOrg will validate your code, and if correct, will generate Schema.org JSON-LD markup. If not, you'll get a descriptive error message.

Notice how the foundingDate is in the required ISO-8601 format. The founding date must be a Ruby Date object and so we can ensure correct formatting. In the same way, the foundingLocation is a Place which adds the proper @type attribute.

You are prevented from creating invalid markup

If you use the wrong type or try to set an unknown attribute, SchemaDotOrg will refuse to create the incorrect JSON-LD. Instead, you'll get a message explaining the problem:

Place.new(address: 12345)
# => ArgumentError: Address is class Integer, not String

Place.new(
  address: '12345 Happy Street',
  author:  'Hemmingway'
)
# => NoMethodError: undefined method `author'

This type safety comes from the ValidatedObject gem.

Supported Schema.org Types

WebSite

Example with only the required attributes:

WebSite.new(
  name: 'Texas Public Law',
  url:  'https://texas.public.law',
)

With the optional SearchAction to enable a Sitelinks Searchbox:

WebSite.new(
  name: 'Texas Public Law',
  url:  'https://texas.public.law',
  potential_action: SearchAction.new(
    target: 'https://texas.public.law/?search={search_term_string}',
    query_input: 'required name=search_term_string'
  )
)

Organization

Example:

Organization.new(
  name:             'Public.Law',
  founder:           Person.new(name: 'Robb Shecter'),
  founding_date:     Date.new(2009, 3, 6),
  founding_location: Place.new(address: 'Portland, OR'),
  email:            '[email protected]',
  url:              'https://www.public.law',
  logo:             'https://www.public.law/favicon-196x196.png',
  same_as: [
    'https://twitter.com/law_is_code',
    'https://www.facebook.com/PublicDotLaw'
  ]
)

Person, Place, and SearchAction

These three aren't too useful on their own in web apps. They're used when creating a WebSite and Organization, as shown above.

Installation

Add this line to your application's Gemfile:

gem 'schema_dot_org'

And then execute:

$ bundle

Or install it yourself as:

$ gem install schema_dot_org

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Contributing

Bug reports and pull requests are welcome on GitHub.

License

The gem is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].