Skip to content

Commit

Permalink
Merge pull request #1330 from hlxsites/wsaw-updts-latst
Browse files Browse the repository at this point in the history
Updated WSAW converter and index
  • Loading branch information
davenichols-DHLS authored Dec 16, 2024
2 parents 39151f6 + 731b38d commit b9816c6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 2 additions & 0 deletions helix-query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ indices:
- /us/en/we-see-a-way/**
exclude:
- /us/en/we-see-a-way
- /us/en/we-see-a-way/solutions
- /us/en/we-see-a-way/solutions/**
target: /us/en/wsaw-index.json
properties:
lastModified:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ <h1>Fast Driving Result</h1>
<hr>
<div class="call-to-action">
<div>
<div>
<h2>Innovative Technologies to Accelerate Identification of High-Quality Clones</h2>
<p><a href="https://event.on24.com/wcc/r/4657241/66962D716A8A1FEA4E73E2777AE1374B?partnerref=Danaher">View Event</a></p>
</div>
<div></div>
</div>
</div>
<h1>Browse Catalog</h1>
Expand Down Expand Up @@ -68,6 +65,11 @@ <h3>Sign up for our newsletter</h3>
</div>
</div>
</div>
<div class="card-list wsaw">
<div>
<div></div>
</div>
</div>
<div class="metadata">
<div>
<div>Title</div>
Expand Down
8 changes: 2 additions & 6 deletions tools/importer/transformers/cardList.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/* global WebImporter */
const URLS_TO_BLOCK_MAP = [
{
url: '/we-see-a-way.html',
blockName: 'Card List (wsaw)',
},
{
url: '/we-see-a-way/solutions/analytical-tools.html',
url: '/we-see-a-way',
blockName: 'Card List (wsaw)',
},
{
Expand Down Expand Up @@ -41,7 +37,7 @@ const URLS_TO_BLOCK_MAP = [
const createCardList = (main, document) => {
const url = document.querySelector('[property="og:url"]')?.content;
if (url) {
const blockName = URLS_TO_BLOCK_MAP.find((item) => url.endsWith(item.url))?.blockName;
const blockName = URLS_TO_BLOCK_MAP.find((item) => url.endsWith(item.url) || url.includes(item.url))?.blockName;
if (blockName) {
const block = [[blockName], ['']];
WebImporter.DOMUtils.remove(main, ['h2', 'p']);
Expand Down

0 comments on commit b9816c6

Please sign in to comment.