From 125a467ec83d882d4c5ad6e8c7c6f010a91bb908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Delval?= Date: Thu, 16 Nov 2023 14:53:10 +0100 Subject: [PATCH] Adding a blog index (#40) --- helix-query.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 helix-query.yaml diff --git a/helix-query.yaml b/helix-query.yaml new file mode 100644 index 00000000..a6d5ddcd --- /dev/null +++ b/helix-query.yaml @@ -0,0 +1,37 @@ +--- +version:1 +indices: + blog_us: + include: + - /blog/** + target: /blog/query-index.json + properties: + lastModified: + select: none + value: parseTimestamp(headers["last-modified"], "ddd, DD MMM YYYY hh:mm:ss GMT") + date: + select: head > meta[name="publication-date"] + value: parseTimestamp(attribute(el, "content"), "MM/DD/YYYY") + title: + select: head > meta[property="og:title"] + value: attribute(el, "content") + description: + select: head > meta[property="og:description"] + value: attribute(el, "content") + blog_ca: + include: + - /ca/blog/** + target: /ca/blog/query-index.json + properties: + lastModified: + select: none + value: parseTimestamp(headers["last-modified"], "ddd, DD MMM YYYY hh:mm:ss GMT") + date: + select: head > meta[name="publication-date"] + value: parseTimestamp(attribute(el, "content"), "MM/DD/YYYY") + title: + select: head > meta[property="og:title"] + value: attribute(el, "content") + description: + select: head > meta[property="og:description"] + value: attribute(el, "content")