-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#292 Configure Sling Mappings and Sitemap Generation #317
base: main
Are you sure you want to change the base?
Conversation
@buuhuu what is the motivation to use Sling Maps over Resource Resolver for shortening the |
jcr:primaryType="sling:Folder" | ||
jcr:mixinTypes="[sling:MappingSpec]" | ||
sling:internalRedirect="[/,/content/wknd]" | ||
sling:match="$[env:AEM_DOMAIN_WKND_SITE].\\d+"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@buuhuu if someone wanted to mimic this for an on-prem (6.5) deployment they would need to use some other mechanism, because env:AEM_DOMAIN_WKND_SITE
is an environment variable set via Cloud Manager and would only be available using AEM as a Cloud Service...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I think WKND should be cloud first and backwards compatible whenever possible, but just wanted to know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using environment variables works as well for AEM on-prem and AMS. However, afaik it is currently only possible with CM and AEMaaCS to set the environment variables in a self-service way.
More details can be found here in the Apache Sling Mappings for Resource Resolution documentation. It would also be possible to refer to config
in combination with an OSGI configuration in on-prem setups instead of using env
.
Description
This PR contributes the configuration of a Sling Mapping using a
AEM_DOMAIN_WKND_SITE
environment variable. It is activated only for thepublish.dev
,publish.stage
andpublish.prod
runmode by the configuration of the Resource Resolver Factory pointing to the mappings directory/etc/map.publish
.Additionally a SitemapGenerator configuration was added to run Sitemap generation once a day at midnight. Both homepages
us/en
andca/en
were marked as sitemap roots. The error pages are configured with anoindex
tag to exclude them from the sitemap.Related Issue
#292
Motivation and Context
Achieve a 100% SEO score with WKND.
How Has This Been Tested?
Locally,
AEMaaCS
Screenshots (if appropriate):
Types of changes
Checklist: