Skip to content

Commit

Permalink
setup sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruchika4 committed May 14, 2024
1 parent 353e7c6 commit ff5c64c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
31 changes: 31 additions & 0 deletions helix-query.yaml
Original file line number Diff line number Diff line change
@@ -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')
14 changes: 14 additions & 0 deletions helix-sitemap.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ff5c64c

Please sign in to comment.