ValidHtmlAuditor

The info.magnolia.services.seo.audit.impl.ValidHtmlAuditor checks the rendered HTML of a page for correctness using the W3C HTML validator. This auditor will capture and save any HTML errors found by the W3C HTML validator.

Class

info.magnolia.services.seo.audit.impl.ParagraphLengthAuditor

Properties

In addition to the common auditor properties, this auditor can be configured with the following properties:

Property Description

level

required

Determines how a failed audit will be counted:

  • Error (auditErrors)

  • Warning (auditWarnings)

  • Note (auditNotes)

auditProperty

required

Defines the property name for storing failed audit results.

The property name should be unique among auditors or auditors may overwrite results.

auditValue

required

Defines a message or explanation for a failed audit.

The message can have placeholders that are replaced with information about the node and auditor:

  • 0 - node path

  • 1 - configured query property

fetcher

required

Added in v5.6.2.

Defines the content fetcher for the selected node. The fetched content is then scanned for links.

There are two types of content fetchers available, for more about content fetchers, see: Content fetchers.

strict

optional, default is false

Controls the level of validation done by the W3C HTML validator.

  • true: return all errors, warnings, and notes found.

  • false: only HTML errors will be returned.

Example

Here is an example from the SEO module. You can find this configuration here: /modules/seo/config/auditManager/auditors/validHTML.

validHTML:
  active: true
  auditProperty: invalidHtml
  class: info.magnolia.services.seo.audit.impl.ValidHtmlAuditor
  description: Check for valid HTML (pre-prod)
  level: auditErrors
  fetcher:
    class: info.magnolia.services.seo.audit.impl.RequestFetcher
    targets:
      localhost:
        class: info.magnolia.services.seo.audit.impl.HostTarget
        host: localhost
        password: superuser
        port: 8080
        scheme: http
        user: superuser
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the SEO module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules