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

Updates to index for career testimonials #66

Merged
merged 1 commit into from
Sep 25, 2023
Merged
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
9 changes: 9 additions & 0 deletions helix-query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,12 @@ indices:
select: head > meta[property="article:tag"]
values: |
attribute(el, 'content')
image:
select: head > meta[property="og:image"]
value: attribute(el, "content")
career-quote:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the need of this ?

Copy link
Author

@bosschaert bosschaert Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need the image. It's stored with the normal metadata as it's also the main image of the page.

The default indexing does this already, but I think you have to list it explicitly if you have a helix-query.yaml file (at least it didn't work for me when I tried it without).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was talking about career-quote and career-jobtitle

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are needed on the career-carousel which is displayed on a number of pages. This is implementing a suggestion from @sdmcraft to put this info in the index so the carousel can obtain its info from there.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, Thanks

select: main .career-hero
value: match(el, '.*?\n?Quote\n([^\n]+)')
career-jobtitle:
select: main .career-hero
value: match(el, '.*?\n?Title\n([^\n]+)')