Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,12 @@ export function decorateGuideTemplateHero(main) {
export function decorateGuideTemplateLinks(main) {
const links = main.querySelectorAll('.content a');
links.forEach((link) => {
const url = new URL(link.href);
if (url.pathname.startsWith('/block-collection/')) {
// Links on a different aem.live domain are made relative to current domain.
// Restore for block collection links.
link.href = `https://main--aem-block-collection--adobe.aem.live${url.pathname}`;
}
link.setAttribute('target', returnLinkTarget(link.href));
});
}
Expand Down