Skip to content

Commit

Permalink
Build fix progress
Browse files Browse the repository at this point in the history
  • Loading branch information
xjensen committed Dec 28, 2023
1 parent eeef71c commit 426fc19
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,15 @@ module.exports = function (eleventyConfig) {
item.data.tags = jsonData.tags;

// WordPress will lazy load everything and you have to put php code in your theme to override it. We don't want to lazy load our featuref image
item.template.frontMatter.content = item.template.frontMatter.content.replace('loading="lazy" class="cagov-featured-image','class="cagov-featured-image');
//item.template.frontMatter.content = item.template.frontMatter.content.replace('loading="lazy" class="cagov-featured-image','class="cagov-featured-image');

let html = item.template.frontMatter.content;
let html = await item.template.read().then(t => {
return t.content
});

// WordPress will lazy load everything and you have to put php code in your theme to override it. We don't want to lazy load our featuref image
html = html.replace('loading="lazy" class="cagov-featured-image','class="cagov-featured-image');

// Temporary rewrite of feature card h2 tag to h1. This is fixed in newer version of Gutenberg blocks plugin still under review so can be deleted when this no longer comes through as h2 causing a11y test failures
if (html.indexOf('cagov-featured-sidebar') > -1) {
const {
Expand Down

0 comments on commit 426fc19

Please sign in to comment.