forked from adobe/theblog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelix-query.yaml
80 lines (79 loc) · 2.23 KB
/
helix-query.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: 1
indices:
raw_index:
source: html
fetch: https://{repo}-{owner}.project-helix.page/{path}
include:
- (en|de|fr)/publish/**/*.(md|docx)
target: https://adobe.sharepoint.com/:x:/r/sites/TheBlog/Shared%20Documents/theblog/en/query-index.xlsx?d=we7bf6b3af3234076968b30a1565f2373&csf=1&web=1&e=q9o8tW
sitemap: en/query-index.json
properties:
author:
select: main > div:nth-of-type(3) > p:nth-of-type(1)
value: |
match(el, 'by (.*)')
title:
select: main > div > h1:first-of-type
value: |
textContent(el)
date:
select: main > div:nth-of-type(3)
value: |
parseTimestamp(el, '[POSTED ON] MM-DD-YYYY')
topics:
select: main > div:last-of-type > p:first-of-type
values: |
match(el, '(Topics: )? ([^,]+)')
products:
select: main > div:last-of-type > p:nth-of-type(2)
values: |
match(el, '(Products: )? ([^,]+)')
hero:
select: main > div:nth-of-type(2) img:first-of-type
value: |
attribute(el, 'src')
teaser:
select: main > div:nth-child(n+4):not(:last-child) p
value: |
words(textContent(el), 0, 20)
sourceHash:
select: head > meta[name=x-source-hash
value: |
attribute(el, 'content')
external-path:
select: none
value: |
replace(path, '/publish/', '/')
queries:
recent:
query: "*"
hitsPerPage: 12
parameters:
- language
- context
- date
filters: |
parents:"${context}${language}" AND date < ${date}
cache: 600
recent-by-author:
query: "*"
hitsPerPage: 12
parameters:
- language
- context
- date
- author
filters: |
parents:"${context}${language}" AND date < ${date} AND author:"${author}"
cache: 600
recent-by-topic:
query: "*"
hitsPerPage: 12
parameters:
- language
- context
- date
- topic
filters: |
parents:"${context}${language}" AND date < ${date} AND topics:"${topic}"
cache: 600