chriskyfung / amp-affiliately-jekyll-theme

An AMP-Ready Jekyll Blog Theme
https://chriskyfung.github.io/amp-affiliately-jekyll-theme/
MIT License
19 stars 12 forks source link

🚨 fix (lint): AMP validation fails for redirect pages #54

Open chriskyfung opened 9 months ago

chriskyfung commented 9 months ago

Description

The AMP validator reports two errors for the redirect pages, like this:

FAIL: <path>\index.html
line 1, col 224: The attribute 'http-equiv' may not appear in tag 'meta'. (see undefined)
line 3, col 385: Custom JavaScript is not allowed. (see https://amp.dev/documentation/guides-and-tutorials/learn/validation-workflow/validation_errors/#custom-javascript-is-not-allowed)

Steps to reproduce

  1. Run the AMP validator after building the site files using npm run build
  2. Observe the errors in the console output

Expected behavior

The redirect pages should pass the AMP validation without any errors.

Actual behavior

The redirect pages fail the AMP validation with two errors.

Environment

Potential solution

To solve the AMP validation errors in the redirect template, follow these steps: