From 3530e98dc2b341f2563c678ebbd635b0187255b9 Mon Sep 17 00:00:00 2001 From: Ben Peter Date: Sat, 25 Jul 2026 10:07:47 +0200 Subject: [PATCH] Add a query index for the learn section Index every /learn article into /learn/query-index.json, so a hub page can list them without hardcoding. Each row carries title, image, description, last-modified date, and robots, read from the article head. The hub page itself is excluded. --- helix-query.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 helix-query.yaml diff --git a/helix-query.yaml b/helix-query.yaml new file mode 100644 index 0000000..6d78395 --- /dev/null +++ b/helix-query.yaml @@ -0,0 +1,30 @@ +version: 1 + +indices: + learn: + target: /learn/query-index + include: + - /learn/** + exclude: + - /learn/product-highlights + properties: + 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') + lastModified: + select: none + value: | + parseTimestamp(headers['last-modified'], 'ddd, DD MMM YYYY hh:mm:ss GMT') + robots: + select: head > meta[name="robots"] + value: | + attribute(el, 'content')