Skip to content

Commit

Permalink
Adding hlx5 support (#331)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Millar <[email protected]>
  • Loading branch information
sabyamon and auniverseaway authored Jan 27, 2025
1 parent 9450f85 commit 50d82ad
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions blocks/shared/pathDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,14 @@ function getRepoDetails({ editor, pathParts, ext }) {
let path = ext === 'html' && !fullPath.endsWith('html') ? `${fullPath}.html` : fullPath;
if (editor === 'sheet' && !path.endsWith('.json')) path = `${path}.${ext}`;

// TODO: Fix this later
const tld = repo === 'da-bacom' || repo === 'help' ? '.aem.page' : '.hlx.page';

return {
owner: org,
repo,
name,
parent,
parentName,
sourceUrl: `${DA_ORIGIN}/${daApi}/${path}`,
previewUrl: `https://main--${repo}--${org}${tld}`,
previewUrl: `https://main--${repo}--${org}.aem.live`,
contentUrl: `${CON_ORIGIN}/${fullPath}`,
};
}
Expand All @@ -72,17 +69,14 @@ function getFullDetails({ editor, pathParts, ext }) {
const daApi = editor === 'config' ? 'config' : 'source';
const path = ext === 'html' && !fullPath.endsWith('html') && editor !== 'sheet' ? `${fullPath}.html` : fullPath;

// TODO: Fix this later
const tld = repo === 'da-bacom' || repo === 'help' ? '.aem.live' : '.hlx.live';

return {
owner: org,
repo,
name: ext === null ? 'config' : name,
parent: ext === null ? `${parent}/${name}` : parent,
parentName: ext === null ? name : parentName,
sourceUrl: `${DA_ORIGIN}/${daApi}/${path}`,
previewUrl: `https://main--${repo}--${org}${tld}${pathname}`,
previewUrl: `https://main--${repo}--${org}.aem.live${pathname}`,
contentUrl: `${CON_ORIGIN}/${fullPath}`,
};
}
Expand Down

0 comments on commit 50d82ad

Please sign in to comment.