Skip to content

Commit

Permalink
feat: schema_types (schema.org)
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Apr 17, 2020
1 parent c0c42cd commit bdde095
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scrap-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const fields_presets = {
'result.keywords',
'result.og_title',
'result.og_image',
'result.schema_types',
'result.h1_count',
'result.h2_count',
'result.h3_count',
Expand Down Expand Up @@ -171,7 +172,8 @@ module.exports = async (baseUrl, options = {}) => {
canonical: $('link[rel="canonical"]').attr('href'),
is_canonical: $('link[rel="canonical"]').attr('href') == window.location.href ? 1 : 0,
og_title: $('meta[property="og:title"]').attr('content'),
og_image: $('meta[property="og:image"]').attr('content')
og_image: $('meta[property="og:image"]').attr('content'),
schema_types: $.unique($('[itemtype]').map((i, item) => $(item).attr('itemType').replace('http://schema.org/', ''))).toArray().join(', ')
};

for(let name in customFields) {
Expand Down

0 comments on commit bdde095

Please sign in to comment.