Skip to content

Commit

Permalink
Add author index (#60)
Browse files Browse the repository at this point in the history
* add author index

* add lastModified back to default index
  • Loading branch information
kronnox authored Jan 12, 2024
1 parent 6f35495 commit abd9faf
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions helix-query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: 1
indices:
default:
include:
- /**
target: /query-index.json
properties:
lastModified:
select: none
value: parseTimestamp(headers["last-modified"], "ddd, DD MMM YYYY hh:mm:ss GMT")
title:
select: head > meta[property="og:title"]
value: attribute(el, "content")
image:
select: head > meta[property="og:image"]
value: match(attribute(el, "content"), "https:\/\/[^/]+(/.*)")
description:
select: head > meta[name="description"]
value: attribute(el, "content")
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)
description:
select: div:nth-of-type(1) > p:nth-of-type(2)
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')
twitter:
select: div:nth-of-type(1) > ul:nth-of-type(1) > li > a
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\/(?:#!\/)?@?([^/?#]*)\/?(?:[?#].*)?$')
instagram:
select: div:nth-of-type(1) > ul:nth-of-type(1) > li > a
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\/(?:#!\/)?@?([^/?#]*)\/?(?:[?#].*)?$')

0 comments on commit abd9faf

Please sign in to comment.