Esempio n. 1
0
 def get_violation_definitions(cls):
     return {
         'empty.anchors': {
             'title':
             _('Empty anchor(s) found'),
             'description':
             _('Empty anchors are not good for Search Engines. '
               'Empty anchors were found for links to: %s.'),
             'value_parser':
             cls.get_empty_anchors_parsed_value,
             'category':
             _('SEO'),
             'generic_description':
             _('By using empty anchor text won\'t prevent search '
               'engines from indexing your pages but you will lose a '
               'good opportunity to add relevance to your pages. '
               'Google uses anchor text in order to qualify the '
               'resources you create a reference to. '
               'In consequences if a page got links with "example" '
               'as anchor text pointing to itself, this page '
               'relevance on "example" request will increase. '
               'So better do not let empty anchor text and choose '
               'wisely the words (or keywords) you use in it.')
         }
     }
Esempio n. 2
0
 def get_fact_definitions(cls):
     return {
         'page.title': {
             'title': _('Page Title'),
             'description': lambda value: value,
             'category': _('SEO'),
         }
     }
Esempio n. 3
0
 def get_fact_definitions(cls):
     return {
         'page.last_modified': {
             'title': _('Last-Modified'),
             'description': lambda value: value,
             'category': _('HTTP'),
             'unit': 'datetime'
         }
     }
 def get_violation_definitions(cls):
     return {
         'invalid.url_word_separator': {
             'title': _('URLs should use hyphens to separate words'),
             'description': cls.get_url_with_underscore_message(),
             'category': _('SEO'),
             'generic_description': cls.get_url_with_underscore_message()
         }
     }
Esempio n. 5
0
 def get_fact_definitions(cls):
     return {
         'robots.url': {
             'title': _('Robots file URL'),
             'description': lambda value: value,
             'category': _('SEO'),
             'unit': 'link',
         }
     }
Esempio n. 6
0
 def get_fact_definitions(cls):
     return {
         'robots.url': {
             'title': _('Robots file URL'),
             'description': lambda value: value,
             'category': _('SEO'),
             'unit': 'link',
         }
     }
Esempio n. 7
0
 def get_fact_definitions(cls):
     return {
         'page.google_analytics': {
             'title': _('Google Analytics'),
             'description': lambda value: list(value),
             'unit': 'google-analytics',
             'category': _('SEO'),
         }
     }
Esempio n. 8
0
 def get_violation_definitions(cls):
     return {
         'invalid.url_word_separator': {
             'title': _('URLs should use hyphens to separate words'),
             'description': cls.get_url_with_underscore_message(),
             'category': _('SEO'),
             'generic_description': cls.get_url_with_underscore_message()
         }
     }
Esempio n. 9
0
 def get_fact_definitions(cls):
     return {
         'page.google_analytics': {
             'title': _('Google Analytics'),
             'description': lambda value: list(value),
             'unit': 'google-analytics',
             'category': _('SEO'),
         }
     }
Esempio n. 10
0
 def get_fact_definitions(cls):
     return {
         'page.last_modified': {
             'title': _('Last-Modified'),
             'description': lambda value: value,
             'category': _('HTTP'),
             'unit': 'datetime'
         }
     }
Esempio n. 11
0
 def get_fact_definitions(cls):
     return {
         'meta.tags': {
             'title': _('Meta Tags'),
             'description': lambda value: value,
             'unit': 'values',
             'category': _('Meta'),
         }
     }
Esempio n. 12
0
 def get_fact_definitions(cls):
     return {
         'meta.tags': {
             'title': _('Meta Tags'),
             'description': lambda value: value,
             'unit': 'values',
             'category': _('Meta'),
         }
     }
Esempio n. 13
0
 def get_fact_definitions(cls):
     return {
         "page.heading_hierarchy": {
             "title": _("Heading Hierarchy"),
             "description": lambda value: list(value),
             "unit": "heading-hierarchy",
             "category": _("SEO"),
         }
     }
Esempio n. 14
0
 def get_fact_definitions(cls):
     return {
         'page.heading_hierarchy': {
             'title': _('Heading Hierarchy'),
             'description': lambda value: list(value),
             'unit': 'heading-hierarchy',
             'category': _('SEO'),
         },
     }
Esempio n. 15
0
 def get_violation_definitions(cls):
     return {
         'page.body.not_found': {
             'title': _('Page body not found'),
             'description': _('Body was not found on %s.'),
             'category': _('Semantics'),
             'generic_description': _(
                 'The <body> tag defines the documents body\'s, it\'s contains '
                 'all the content of an HTML document. The ausence of a this tag '
                 'represents a no content and sematically invalid webpage.'
             ),
         }
     }
Esempio n. 16
0
 def get_violation_definitions(cls):
     return {
         'absent.metatags.open_graph': {
             'title': _('Open Graph tags not found'),
             'description': _('Some tags are missing: %(tags)s'),
             'value_parser': cls.get_open_graph_parsed_value,
             'category': _('SEO'),
             'generic_description': _(
                 'Validates the absent of Open Graph metatags. '
                 'They allow the Facebook Crawler to generate '
                 'previews when your content is shared on Facebook.'
             )
         },
     }
Esempio n. 17
0
 def get_violation_definitions(cls):
     return {
         'absent.meta.tags': {
             'title': _('Required Meta Tags were not found'),
             'description': _("Meta tags for %s were not found."),
             'value_parser': lambda value: ', '.join(value),
             'category': _('HTTP'),
             'generic_description': _(
                 'Validates the absent of user defined MetaTags. '
                 'This values are configurable by Holmes Configuration.'
             ),
             'unit': 'list'
         }
     }
Esempio n. 18
0
 def get_violation_definitions(cls):
     return {
         'link.redirect.302': {
             'title': _('Link with 302 redirect'),
             'description': _(
                 'Link with 302 redirect, in most cases, should '
                 'not be used. Redirects were found for '
                 'link: %s.'),
             'category': _('HTTP'),
             'generic_description': _(
                 'Validates temporary redirections (302). '
                 'They should not be used in the most cases, instead '
                 'is best to use a 301 permanent redirect.'
             )
         },
         'link.redirect.307': {
             'title': _('Link with 307 redirect'),
             'description': _(
                 'Link with 307 redirect, in most cases, should '
                 'not be used. Redirects were found for '
                 'link: %s.'),
             'category': _('HTTP'),
             'generic_description': _(
                 'Validates temporary redirections (307). '
                 'They should not be used in the most cases, instead '
                 'is best to use a 301 permanent redirect.'
             )
         },
     }
Esempio n. 19
0
 def get_fact_definitions(cls):
     return {
         'page.css': {
             'title': _('CSS'),
             'description': lambda value: list(value),
             'unit': 'css',
             'category': _('Static'),
         },
         'total.requests.css': {
             'title': _('Total CSS requests'),
             'description': lambda value: '%d' % value,
             'category': _('HTTP'),
             'unit': 'number'
         },
         'total.size.css': {
             'title': _('Total CSS size'),
             'description': lambda value: '%d' % value,
             'unit': 'kb',
             'category': _('SEO'),
         },
         'total.size.css.gzipped': {
             'title': _('Total CSS size gzipped'),
             'description': lambda value: '%d' % value,
             'unit': 'kb',
             'category': _('SEO'),
         }
     }
Esempio n. 20
0
 def get_violation_definitions(cls):
     return {
         'invalid.images.alt': {
             'title': _('Image(s) without alt attribute'),
             'description': _(
                 'Images without alt text are not good for '
                 'Search Engines. Images without alt were '
                 'found for: %(images)s.'),
             'value_parser': cls.get_without_alt_parsed_value,
             'category': _('SEO'),
             'generic_description': _(
                 'Images without alt attribute are not good for '
                 'search engines. They are searchable by the content '
                 'of this attribute, so if it\'s empty, it cause bad '
                 'indexing optimization.'
             )
         },
         'invalid.images.alt_too_big': {
             'title': _('Image(s) with alt attribute too big'),
             'description': _(
                 'Images with alt text bigger than %(max_size)d chars are '
                 'not good for search engines. Images with a too big alt '
                 'were found for: %(images)s.'),
             'value_parser': cls.get_alt_too_big_parsed_value,
             'category': _('SEO'),
             'generic_description': _(
                 'Images with alt text too long are not good to SEO. '
                 'This maximum value are configurable '
                 'by Holmes configuration.'
             ),
             'unit': 'number'
         }
     }
Esempio n. 21
0
 def get_fact_definitions(cls):
     return {
         'page.links': {
             'title': _('Links to'),
             'description': lambda value: list(value),
             'unit': 'links',
             'category': _('SEO'),
         },
         'total.number.links': {
             'title': _('Link count'),
             'description': lambda value: value,
             'category': _('HTTP'),
             'unit': 'number'
         },
         'total.number.invalid_links': {
             'title': _('Total invalid links'),
             'description': lambda value: value,
             'category': _('Semantics'),
             'unit': 'number'
         },
         'page.invalid_links': {
             'title': _('Invalid Links'),
             'description': lambda value: list(value),
             'unit': 'invalid-links',
             'category': _('Semantics'),
         }
     }
Esempio n. 22
0
 def get_violation_definitions(cls):
     return {
         'link.broken': {
             'title': _('Broken link(s) found'),
             'description': _(
                 'This page contains broken links to %(links)s '
                 '(the urls failed to load or timed-out after 10 seconds). '
                 'This can lead your site to lose rating with '
                 'search engines and is misleading to users.'),
             'value_parser': cls.get_links_parsed_value,
             'category': _('HTTP'),
             'generic_description': _(
                 'Validates hyperlinks with a invalid resource. '
                 'The pointed resource can be a Client or a '
                 'Server Error, they can be timeout load or, '
                 'in most cases, means a not founded page.'
             )
         },
         'link.moved.temporarily': {
             'title': _('Moved Temporarily'),
             'description': _(
                 'A link from your page to "%(links)s" is using a 302 or '
                 '307 redirect. It passes 0%% of link juice (ranking '
                 'power) and, in most cases, should not be used. Use '
                 '301 instead.'),
             'value_parser': cls.get_links_parsed_value,
             'category': _('HTTP'),
             'generic_description': _(
                 'Validates links that uses a 302 or 307 redirect. '
                 'In this cases, it passes 0% of link juice (ranking '
                 'power) and, in most cases, should not be used. Use of '
                 '301 is recommended.'
             )
         }
     }
Esempio n. 23
0
 def get_violation_definitions(cls):
     return {
         'absent.metatags': {
             'title': _('Meta tags not present'),
             'description': _(
                 'No meta tags found on this page. This is damaging for '
                 'Search Engines.'
             ),
             'category': _('HTTP'),
             'generic_description': _(
                 'Validates the presence of metatags. They are important '
                 'to inform metadata about the HTML document. '
                 'The absent of metatags are damaging for search '
                 'engines. Meta elements are typically used to specify '
                 'page description, keywords, author of the document, last '
                 'modified, and other metadata.'
             )
         },
         'page.metatags.description_too_big': {
             'title': _('Maximum size of description meta tag'),
             'description': _(
                 'The meta description tag is longer than %(max_size)s '
                 'characters. It is best to keep meta descriptions '
                 'shorter for better indexing on search engines.'
             ),
             'category': _('SEO'),
             'generic_description': _(
                 'Validates the size of a description metatag. It is best '
                 'to keep meta descriptions shorter for better indexing on '
                 'search engines. This limit is configurable by Holmes '
                 'Configuration.'
             ),
             'unit': 'number'
         }
     }
Esempio n. 24
0
 def get_violation_definitions(cls):
     return {
         'total.requests.css': {
             'title': _('Too many CSS requests'),
             'description': _(
                 'This page has %(total_css_files)d CSS request '
                 '(%(over_limit)d over limit). Having too many '
                 'requests impose a tax in the browser due to handshakes.'),
             'category': _('Performance'),
             'generic_description': _(
                 'Pages with too many CSS requests aren\'t good to '
                 'performance. Overflowing this limit of requests can '
                 'impose a tax in the browser due to handshakes. This '
                 'limit of requests per page is configurable.'
             ),
             'unit': 'number'
         },
         'total.size.css': {
             'title': _('CSS size in kb is too big'),
             'description': _(
                 'There\'s %.2fkb of CSS in this page and that '
                 'adds up to more download time slowing down the '
                 'page rendering to the user.'),
             'category': _('Performance'),
             'generic_description': _(
                 'Pages with too big CSS files aren\'t good to performance. '
                 'Having this limit of file sizes overflow adds up to more '
                 'download time slowing down the page rendering to the user. '
                 'This limit of requests per page is configurable.'
             ),
             'unit': 'number'
         },
     }
Esempio n. 25
0
 def get_violation_definitions(cls):
     return {
         'total.requests.js': {
             'title': _('Too many JavaScript requests'),
             'description': _(
                 'This page has %(total_js_files)d JavaScript request '
                 '(%(over_limit)d over limit). Having too many requests '
                 'impose a tax in the browser due to handshakes.'),
             'category': _('Performance'),
             'generic_description': _(
                 'A site with too many JavaScript requests per page can '
                 'deacrease the page load speed and performance. This '
                 'limits are configurable in Holmes configuration.'
             ),
             'unit': 'number'
         },
         'total.size.js': {
             'title': _('JavaScript size in kb is too big'),
             'description': _(
                 'There\'s %.2fkb of JavaScript in this page and '
                 'that adds up to more download time slowing down '
                 'the page rendering to the user.'),
             'category': _('Performance'),
             'generic_description': _(
                 'A site with a too big total JavaScript size per page can '
                 'decrease the page load speed and performance. This '
                 'limits are configurable in Holmes configuration.'
             ),
             'unit': 'number'
         }
     }
Esempio n. 26
0
 def get_violation_definitions(cls):
     return {
         'total.requests.js': {
             'title':
             _('Too many JavaScript requests'),
             'description':
             _('This page has %(total_js_files)d JavaScript request '
               '(%(over_limit)d over limit). Having too many requests '
               'impose a tax in the browser due to handshakes.'),
             'category':
             _('Performance'),
             'generic_description':
             _('A site with too many JavaScript requests per page can '
               'deacrease the page load speed and performance. This '
               'limits are configurable in Holmes configuration.'),
             'unit':
             'number'
         },
         'total.size.js': {
             'title':
             _('JavaScript size in kb is too big'),
             'description':
             _('There\'s %.2fkb of JavaScript in this page and '
               'that adds up to more download time slowing down '
               'the page rendering to the user.'),
             'category':
             _('Performance'),
             'generic_description':
             _('A site with a too big total JavaScript size per page can '
               'decrease the page load speed and performance. This '
               'limits are configurable in Holmes configuration.'),
             'unit':
             'number'
         }
     }
Esempio n. 27
0
 def get_fact_definitions(cls):
     return {
         'page.css': {
             'title': _('CSS'),
             'description': lambda value: list(value),
             'unit': 'css',
             'category': _('Static'),
         },
         'total.requests.css': {
             'title': _('Total CSS requests'),
             'description': lambda value: '%d' % value,
             'category': _('HTTP'),
             'unit': 'number'
         },
         'total.size.css': {
             'title': _('Total CSS size'),
             'description': lambda value: '%d' % value,
             'unit': 'kb',
             'category': _('SEO'),
         },
         'total.size.css.gzipped': {
             'title': _('Total CSS size gzipped'),
             'description': lambda value: '%d' % value,
             'unit': 'kb',
             'category': _('SEO'),
         }
     }
Esempio n. 28
0
 def get_violation_definitions(cls):
     return {
         'link.redirect.302': {
             'title':
             _('Link with 302 redirect'),
             'description':
             _('Link with 302 redirect, in most cases, should '
               'not be used. Redirects were found for '
               'link: %s.'),
             'category':
             _('HTTP'),
             'generic_description':
             _('Validates temporary redirections (302). '
               'They should not be used in the most cases, instead '
               'is best to use a 301 permanent redirect.')
         },
         'link.redirect.307': {
             'title':
             _('Link with 307 redirect'),
             'description':
             _('Link with 307 redirect, in most cases, should '
               'not be used. Redirects were found for '
               'link: %s.'),
             'category':
             _('HTTP'),
             'generic_description':
             _('Validates temporary redirections (307). '
               'They should not be used in the most cases, instead '
               'is best to use a 301 permanent redirect.')
         },
     }
Esempio n. 29
0
 def get_fact_definitions(cls):
     return {
         "page.js": {
             "title": _("JS"),
             "description": lambda value: list(value),
             "unit": "js",
             "category": _("Static"),
         },
         "total.requests.js": {
             "title": _("Total JS requests"),
             "description": lambda value: value,
             "category": _("HTTP"),
             "unit": "number",
         },
         "total.size.js": {
             "title": _("Total JS size"),
             "description": lambda value: "%d" % value,
             "unit": "kb",
             "category": _("SEO"),
         },
         "total.size.js.gzipped": {
             "title": _("Total JS size gzipped"),
             "description": lambda value: "%d" % value,
             "unit": "kb",
             "category": _("SEO"),
         },
     }
Esempio n. 30
0
 def get_fact_definitions(cls):
     return {
         'page.links': {
             'title': _('Links to'),
             'description': lambda value: list(value),
             'unit': 'links',
             'category': _('SEO'),
         },
         'total.number.links': {
             'title': _('Link count'),
             'description': lambda value: value,
             'category': _('HTTP'),
             'unit': 'number'
         },
         'total.number.invalid_links': {
             'title': _('Total invalid links'),
             'description': lambda value: value,
             'category': _('Semantics'),
             'unit': 'number'
         },
         'page.invalid_links': {
             'title': _('Invalid Links'),
             'description': lambda value: list(value),
             'unit': 'invalid-links',
             'category': _('Semantics'),
         }
     }
Esempio n. 31
0
 def get_violation_definitions(cls):
     return {
         'blacklist.domains': {
             'title': _('Domain Blacklist'),
             'description': _('Some links are blacklisted: %s'),
             'value_parser': cls.get_blacklist_parsed_value,
             'category': _('SEO'),
             'generic_description': _(
                 'Detected domain blacklisted hyperlinks. '
                 'Links with this violation are those that have anchors '
                 'to websites added in Holmes\'s Black List configuration.'
             ),
             'unit': 'list'
         }
     }
Esempio n. 32
0
 def get_violation_definitions(cls):
     return {
         'presence.meta.robots.noindex': {
             'title': _('Meta Robots with value of noindex'),
             'description': cls.META_ROBOTS_NO_INDEX,
             'category': _('SEO'),
             'generic_description': cls.META_ROBOTS_NO_INDEX
         },
         'presence.meta.robots.nofollow': {
             'title': _('Meta Robots with value of nofollow'),
             'description': cls.META_ROBOTS_NO_FOLLOW,
             'category': _('SEO'),
             'generic_description': cls.META_ROBOTS_NO_FOLLOW
         }
     }
Esempio n. 33
0
 def get_violation_definitions(cls):
     return {
         'presence.meta.robots.noindex': {
             'title': _('Meta Robots with value of noindex'),
             'description': cls.META_ROBOTS_NO_INDEX,
             'category': _('SEO'),
             'generic_description': cls.META_ROBOTS_NO_INDEX
         },
         'presence.meta.robots.nofollow': {
             'title': _('Meta Robots with value of nofollow'),
             'description': cls.META_ROBOTS_NO_FOLLOW,
             'category': _('SEO'),
             'generic_description': cls.META_ROBOTS_NO_FOLLOW
         }
     }
Esempio n. 34
0
 def get_violation_definitions(cls):
     return {
         'page.body.not_found': {
             'title':
             _('Page body not found'),
             'description':
             _('Body was not found on %s.'),
             'category':
             _('Semantics'),
             'generic_description':
             _('The <body> tag defines the documents body\'s, it\'s contains '
               'all the content of an HTML document. The ausence of a this tag '
               'represents a no content and sematically invalid webpage.'),
         }
     }
Esempio n. 35
0
 def get_violation_definitions(cls):
     return {
         'page.last_modified.not_found': {
             'title': _('Last-Modified not found'),
             'description': _('Last-Modified was not found on %s.'),
             'category': _('HTTP'),
             'generic_description': _(
                 'The Last-Modified Header information allows Web Crawlers '
                 '(like Holmes) and search engines to know if the page is '
                 'modified since the last content retrival. If '
                 'Last-Modified wasn\'t present, all requests made by '
                 'this engines on the page will proccess all the content '
                 'and can be performatically bad to the server.'
             )
         }
     }
Esempio n. 36
0
 def get_url_with_underscore_message(cls):
     return _('Google treats a hyphen as a word separator, but does '
              'not treat an underscore that way. Google treats and '
              'underscore as a word joiner, so red_sneakers is the '
              'same as redsneakers to Google. This has been confirmed '
              'directly by Google themselves, including the fact that '
              'using dashes over underscores will have a (minor) '
              'ranking benefit.')
 def get_url_with_underscore_message(cls):
     return _('Google treats a hyphen as a word separator, but does '
              'not treat an underscore that way. Google treats and '
              'underscore as a word joiner, so red_sneakers is the '
              'same as redsneakers to Google. This has been confirmed '
              'directly by Google themselves, including the fact that '
              'using dashes over underscores will have a (minor) '
              'ranking benefit.')
Esempio n. 38
0
    def validate(self):
        css_files = self.get_css_requests()
        js_files = self.get_js_requests()
        img_files = self.get_img_requests()

        self.add_fact(key='total.requests',
                      value=len(css_files) + len(js_files) + len(img_files),
                      title=_('Total requests'))
 def get_violation_definitions(cls):
     return {
         'invalid.links.nofollow': {
             'title': _('Links with rel="nofollow"'),
             'description': _(
                 'Links with rel="nofollow" to the same '
                 'domain as the page make it harder for search '
                 'engines to crawl the website. Links with '
                 'rel="nofollow" were found for hrefs (%(links)s).'),
             'value_parser': cls.get_links_nofollow_parsed_value,
             'category': _('SEO'),
             'generic_description': _(
                 'Validates links with rel="nofollow", this whos links to '
                 'the same domain as the page make it harder for search '
                 'engines to crawl the website.'
             )
         }
     }
Esempio n. 40
0
 def get_violation_definitions(cls):
     return {
         'absent.meta.tags': {
             'title':
             _('Required Meta Tags were not found'),
             'description':
             _("Meta tags for %s were not found."),
             'value_parser':
             lambda value: ', '.join(value),
             'category':
             _('HTTP'),
             'generic_description':
             _('Validates the absent of user defined MetaTags. '
               'This values are configurable by Holmes Configuration.'),
             'unit':
             'list'
         }
     }
Esempio n. 41
0
 def get_violation_definitions(cls):
     return {
         'page.last_modified.not_found': {
             'title':
             _('Last-Modified not found'),
             'description':
             _('Last-Modified was not found on %s.'),
             'category':
             _('HTTP'),
             'generic_description':
             _('The Last-Modified Header information allows Web Crawlers '
               '(like Holmes) and search engines to know if the page is '
               'modified since the last content retrival. If '
               'Last-Modified wasn\'t present, all requests made by '
               'this engines on the page will proccess all the content '
               'and can be performatically bad to the server.')
         }
     }
Esempio n. 42
0
 def get_violation_definitions(cls):
     return {
         'blacklist.domains': {
             'title':
             _('Domain Blacklist'),
             'description':
             _('Some links are blacklisted: %s'),
             'value_parser':
             cls.get_blacklist_parsed_value,
             'category':
             _('SEO'),
             'generic_description':
             _('Detected domain blacklisted hyperlinks. '
               'Links with this violation are those that have anchors '
               'to websites added in Holmes\'s Black List configuration.'),
             'unit':
             'list'
         }
     }
Esempio n. 43
0
    def validate(self):
        css_files = self.get_css_requests()
        js_files = self.get_js_requests()
        img_files = self.get_img_requests()

        self.add_fact(
            key='total.requests',
            value=len(css_files) + len(js_files) + len(img_files),
            title=_('Total requests')
        )
Esempio n. 44
0
 def get_violation_definitions(cls):
     return {
         'page.heading_hierarchy.size': {
             'title': _('Maximum size of a heading hierarchy'),
             'description': _(
                 'Heading hierarchy values bigger than %(max_size)s '
                 'characters aren\'t good for Search Engines. This '
                 'elements were found: '
                 '<ul class="violation-hh-list">%(hh_list)s</ul>'),
             'value_parser': cls.get_violation_parsed_value,
             'category': _('SEO'),
             'generic_description': _(
                 'Heading hierarchy tags with values too big aren\'t good '
                 'for search engines. The definition of this maximum size '
                 'can be configurable on Holmes.'
             ),
             'unit': 'number'
         }
     }
Esempio n. 45
0
class MetaRobotsValidator(Validator):
    META_ROBOTS_NO_INDEX = _('A meta tag with the robots="noindex" '
                             'attribute tells the search engines that '
                             'they should not index this page.')

    META_ROBOTS_NO_FOLLOW = _('A meta tag with the robots="nofollow" '
                              'attribute tells the search engines that they '
                              'should not follow any links in this page.')

    @classmethod
    def get_violation_definitions(cls):
        return {
            'presence.meta.robots.noindex': {
                'title': _('Meta Robots with value of noindex'),
                'description': cls.META_ROBOTS_NO_INDEX,
                'category': _('SEO'),
                'generic_description': cls.META_ROBOTS_NO_INDEX
            },
            'presence.meta.robots.nofollow': {
                'title': _('Meta Robots with value of nofollow'),
                'description': cls.META_ROBOTS_NO_FOLLOW,
                'category': _('SEO'),
                'generic_description': cls.META_ROBOTS_NO_FOLLOW
            }
        }

    def validate(self):
        tags = self.get_meta_tags()

        for tag in tags:
            if tag['key'] == 'robots' and tag['content'] == 'noindex':
                self.add_violation(key='presence.meta.robots.noindex',
                                   value=None,
                                   points=80)

            if tag['key'] == 'robots' and tag['content'] == 'nofollow':
                self.add_violation(key='presence.meta.robots.nofollow',
                                   value=None,
                                   points=50)

    def get_meta_tags(self):
        return self.review.data.get('meta.tags', None)
Esempio n. 46
0
 def get_violation_definitions(cls):
     return {
         'page.heading_hierarchy.h1_not_found': {
             'title':
             _('H1 Headings not found'),
             'description':
             _('Your page does not contain any H1 headings. H1 headings '
               'help indicate the important topics of your page to '
               'search engines. While less important than good '
               'meta-titles and descriptions, H1 headings may still '
               'help define the topic of your page to search engines.'),
             'category':
             'SEO',
             'generic_description':
             ('H1 headings help indicate the important topics of your '
              'page to search engines. While less important than good '
              'meta-titles and descriptions, H1 headings may still '
              'help define the topic of your page to search engines.')
         }
     }
 def get_violation_definitions(cls):
     return {
         'invalid.links.nofollow': {
             'title':
             _('Links with rel="nofollow"'),
             'description':
             _('Links with rel="nofollow" to the same '
               'domain as the page make it harder for search '
               'engines to crawl the website. Links with '
               'rel="nofollow" were found for hrefs (%(links)s).'),
             'value_parser':
             cls.get_links_nofollow_parsed_value,
             'category':
             _('SEO'),
             'generic_description':
             _('Validates links with rel="nofollow", this whos links to '
               'the same domain as the page make it harder for search '
               'engines to crawl the website.')
         }
     }
Esempio n. 48
0
 def get_violation_definitions(cls):
     return {
         'page.heading_hierarchy.h1_not_found': {
             'title': _('H1 Headings not found'),
             'description': _(
                 'Your page does not contain any H1 headings. H1 headings '
                 'help indicate the important topics of your page to '
                 'search engines. While less important than good '
                 'meta-titles and descriptions, H1 headings may still '
                 'help define the topic of your page to search engines.'
             ),
             'category': 'SEO',
             'generic_description': (
                 'H1 headings help indicate the important topics of your '
                 'page to search engines. While less important than good '
                 'meta-titles and descriptions, H1 headings may still '
                 'help define the topic of your page to search engines.'
             )
         }
     }
 def get_violation_definitions(cls):
     return {
         'absent.meta.canonical': {
             'title': _('Link with rel="canonical" not found'),
             'description': _(
                 'As can be seen in this page '
                 '<a href="https://support.google.com/webmasters/answer/'
                 '139394?hl=en">About rel="canonical"</a>, it\'s a good '
                 'practice to include rel="canonical" urls in the pages '
                 'for your website.'
             ),
             'category': _('SEO'),
             'generic_description': _(
                 'Validates the absent of link with rel="canonical" on '
                 'the head of a page. This indicates the preferred URL '
                 'to use to access the green dress post, so that the '
                 'search results will be more likely to show users '
                 'that URL structure.'
             ),
             'unit': 'boolean'
         }
     }
 def get_violation_definitions(cls):
     return {
         'empty.anchors': {
             'title': _('Empty anchor(s) found'),
             'description': _(
                 'Empty anchors are not good for Search Engines. '
                 'Empty anchors were found for links to: %s.'),
             'value_parser': cls.get_empty_anchors_parsed_value,
             'category': _('SEO'),
             'generic_description': _(
                 'By using empty anchor text won\'t prevent search '
                 'engines from indexing your pages but you will lose a '
                 'good opportunity to add relevance to your pages. '
                 'Google uses anchor text in order to qualify the '
                 'resources you create a reference to. '
                 'In consequences if a page got links with "example" '
                 'as anchor text pointing to itself, this page '
                 'relevance on "example" request will increase. '
                 'So better do not let empty anchor text and choose '
                 'wisely the words (or keywords) you use in it.')
         }
     }
Esempio n. 51
0
 def get_violation_definitions(cls):
     return {
         'page.heading_hierarchy.size': {
             'title':
             _('Maximum size of a heading hierarchy'),
             'description':
             _('Heading hierarchy values bigger than %(max_size)s '
               'characters aren\'t good for Search Engines. This '
               'elements were found: '
               '<ul class="violation-hh-list">%(hh_list)s</ul>'),
             'value_parser':
             cls.get_violation_parsed_value,
             'category':
             _('SEO'),
             'generic_description':
             _('Heading hierarchy tags with values too big aren\'t good '
               'for search engines. The definition of this maximum size '
               'can be configurable on Holmes.'),
             'unit':
             'number'
         }
     }
Esempio n. 52
0
 def get_violation_definitions(cls):
     return {
         'absent.meta.canonical': {
             'title':
             _('Link with rel="canonical" not found'),
             'description':
             _('As can be seen in this page '
               '<a href="https://support.google.com/webmasters/answer/'
               '139394?hl=en">About rel="canonical"</a>, it\'s a good '
               'practice to include rel="canonical" urls in the pages '
               'for your website.'),
             'category':
             _('SEO'),
             'generic_description':
             _('Validates the absent of link with rel="canonical" on '
               'the head of a page. This indicates the preferred URL '
               'to use to access the green dress post, so that the '
               'search results will be more likely to show users '
               'that URL structure.'),
             'unit':
             'boolean'
         }
     }
 def get_violation_definitions(cls):
     return {
         'page.canonicalization.different_endpoints': {
             'title': _('Canonical URLs have different endpoints'),
             'description': _(
                 'This page have the canonical url`s "%(no_www_url)s" and '
                 '"%(www_url)s" with different endpoints. This both url`s '
                 'should point to the same location. '
                 'Not fixing this may cause search engines to be unsure as '
                 'to which URL is the correct one to index.'
             ),
             'category': _('SEO'),
             'generic_description': _(
                 'Canonical URLs is a couple of URLs with and without '
                 'the \'www\' prefix. For example: site.com and www.site.com '
                 'are canonical URLs. This violation is about a root page with '
                 'your canonical URLs pointing to different endpoints. This '
                 'behavior is down ranked in Search Engines indexing.'
             )
         },
         'page.canonicalization.no_301_redirect': {
             'title': _('Canonical URLs have a non 301 redirect'),
             'description': _(
                 'This Canonical url "%(effective_url)s" is redirecting to '
                 '"%(location)s" with a different than 301 status code: '
                 '%(status_code)s. This may cause search engines to be '
                 'unsure to where the URL is being redirected.'),
             'value_parser': cls.get_no_301_parsed_value,
             'category': _('SEO'),
             'generic_description': _(
                 'Canonical URLs is a couple of URLs with and without '
                 'the \'www\' prefix. For example: site.com and www.site.com '
                 'are canonical URLs. Canonical URLs should point to the '
                 'same points. This violation is about a redirection of one '
                 'of this URLs maked by a non 301 redirection. Redirections '
                 'different than a 301 type may cause search engines to be '
                 'unsure to where the URL is being redirected.'
             )
         }
     }
Esempio n. 54
0
 def get_violation_definitions(cls):
     return {
         'invalid.images.alt': {
             'title':
             _('Image(s) without alt attribute'),
             'description':
             _('Images without alt text are not good for '
               'Search Engines. Images without alt were '
               'found for: %(images)s.'),
             'value_parser':
             cls.get_without_alt_parsed_value,
             'category':
             _('SEO'),
             'generic_description':
             _('Images without alt attribute are not good for '
               'search engines. They are searchable by the content '
               'of this attribute, so if it\'s empty, it cause bad '
               'indexing optimization.')
         },
         'invalid.images.alt_too_big': {
             'title':
             _('Image(s) with alt attribute too big'),
             'description':
             _('Images with alt text bigger than %(max_size)d chars are '
               'not good for search engines. Images with a too big alt '
               'were found for: %(images)s.'),
             'value_parser':
             cls.get_alt_too_big_parsed_value,
             'category':
             _('SEO'),
             'generic_description':
             _('Images with alt text too long are not good to SEO. '
               'This maximum value are configurable '
               'by Holmes configuration.'),
             'unit':
             'number'
         }
     }
Esempio n. 55
0
 def get_fact_definitions(cls):
     return {
         'total.sitemap.indexes': {
             'title': _('Total SiteMap indexes'),
             'category': _('SEO'),
             'unit': 'number'
         },
         'total.sitemap.urls': {
             'title': _('Total SiteMap urls'),
             'category': _('SEO'),
             'unit': 'number'
         },
         'total.size.sitemap': {
             'title': _('Total SiteMap size'),
             'unit': 'kb',
             'category': _('SEO'),
         },
         'total.size.sitemap.gzipped': {
             'title': _('Total SiteMap gzipped size'),
             'unit': 'kb',
             'category': _('SEO'),
         }
     }