Skip to content

Commit

Permalink
add articles index
Browse files Browse the repository at this point in the history
  • Loading branch information
kronnox committed Jan 12, 2024
1 parent 2748686 commit 1321896
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions helix-query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,55 @@ indices:
description:
select: head > meta[name="description"]
value: attribute(el, "content")
articles:
include:
- /cigaradvisor/posts/**
target: /cigaradvisor/posts/query-index.json
properties:
title:
select: head > meta[property="og:title"]
value: attribute(el, "content")
author:
select: head > meta[name="author"]
value: match(attribute(el, "content"), "(?:https:\/\/[^/]+)?(.+)")
published:
select: head > meta[name="publisheddate"]
value: parseTimestamp(attribute(el, "content"), "ddd, DD MMM YYYY hh:mm:ss GMT")
readingTime:
select: head > meta[name="readingtime"]
value: attribute(el, "content")
image:
select: head > meta[property="og:image"]
value: match(attribute(el, "content"), "(?:https:\/\/[^/]+)?(.+)")
description:
select: head > meta[property="og:description"]
value: attribute(el, "content")
category:
select: head > meta[name="category"]
value: match(attribute(el, "content"), "(?:https:\/\/[^/]+)?(.+)")
authors:
include:
- /cigaradvisor/author/**
target: /cigaradvisor/author/query-index.json
properties:
name:
select: div:nth-of-type(1) > h2:nth-of-type(1)
value: |
textContent(el)
value: textContent(el)
description:
select: div:nth-of-type(1) > p:nth-of-type(2)
value: |
textContent(el)
value: textContent(el)
image:
select: div:nth-of-type(1) > p:nth-of-type(1) > picture:nth-of-type(1) > img
value: |
attribute(el, 'src')
value: match(attribute(el, 'src'), "(?:https:\/\/[^/]+)?(.+)")
twitter:
select: div:nth-of-type(1) > ul:nth-of-type(1) > li > a
value: |
match(attribute(el, 'href'), '^https?:\/\/(?:www\.)?twitter\.com\/(?:#!\/)?@?([^/?#]*)\/?(?:[?#].*)?$')
value: match(attribute(el, 'href'), '^https?:\/\/(?:www\.)?twitter\.com\/(?:#!\/)?@?([^/?#]*)\/?(?:[?#].*)?$')
facebook:
select: div:nth-of-type(1) > ul:nth-of-type(1) > li > a
value: |
match(attribute(el, 'href'), '^https?:\/\/(?:www\.)?facebook\.com\/(?:#!\/)?@?([^/?#]*)\/?(?:[?#].*)?$')
value: match(attribute(el, 'href'), '^https?:\/\/(?:www\.)?facebook\.com\/(?:#!\/)?@?([^/?#]*)\/?(?:[?#].*)?$')
instagram:
select: div:nth-of-type(1) > ul:nth-of-type(1) > li > a
value: |
match(attribute(el, 'href'), '^https?:\/\/(?:www\.)?instagram\.com\/(?:#!\/)?@?([^/?#]*)\/?(?:[?#].*)?$')
value: match(attribute(el, 'href'), '^https?:\/\/(?:www\.)?instagram\.com\/(?:#!\/)?@?([^/?#]*)\/?(?:[?#].*)?$')
youtube:
select: div:nth-of-type(1) > ul:nth-of-type(1) > li > a
value: |
match(attribute(el, 'href'), '^https?:\/\/(?:www\.)?youtube\.com\/user\/(?:#!\/)?@?([^/?#]*)\/?(?:[?#].*)?$')
value: match(attribute(el, 'href'), '^https?:\/\/(?:www\.)?youtube\.com\/user\/(?:#!\/)?@?([^/?#]*)\/?(?:[?#].*)?$')

0 comments on commit 1321896

Please sign in to comment.