Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated WSAW converter and index #1330

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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;

Check failure on line 40 in tools/importer/transformers/cardList.js

View workflow job for this annotation

GitHub Actions / build

This line has a length of 116. Maximum allowed is 100
if (blockName) {
const block = [[blockName], ['']];
WebImporter.DOMUtils.remove(main, ['h2', 'p']);
Expand Down
Loading