From ff5c64c7ac51e6bfc29c782648e0d4cd3ff5c3b7 Mon Sep 17 00:00:00 2001 From: Ruchika Sinha <69535463+Ruchika4@users.noreply.github.com> Date: Tue, 14 May 2024 11:58:54 -0700 Subject: [PATCH] setup sitemap --- helix-query.yaml | 31 +++++++++++++++++++++++++++++++ helix-sitemap.yaml | 14 ++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 helix-query.yaml create mode 100644 helix-sitemap.yaml diff --git a/helix-query.yaml b/helix-query.yaml new file mode 100644 index 0000000..fdf8b88 --- /dev/null +++ b/helix-query.yaml @@ -0,0 +1,31 @@ +version: 1 + +indices: + def: &def + exclude: + - '**/gnav**' + - '**/footer**' + - '**/drafts/**' + - '**/fragments/**' + include: + - /news/** + target: /assets/query-index.xlsx + properties: + title: + select: head > meta[property="og:title"] + value: attribute(el, 'content') + date: + select: head > meta[name="publishdate"] + value: dateValue(attribute(el, 'content'), 'MM-DD-YYYY') + 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') diff --git a/helix-sitemap.yaml b/helix-sitemap.yaml new file mode 100644 index 0000000..216e021 --- /dev/null +++ b/helix-sitemap.yaml @@ -0,0 +1,14 @@ + +version: 1 + +sitemaps: + news: + origin: https://news.adobe.com + lastmod: YYYY-MM-DD + default: en + languages: + en: + source: /assets/query-index.json + alternate: /{path}.html + destination: /assets/sitemap.xml + hreflang: en