Skip to content
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

[Release] Stage to Main #208

Merged
merged 5 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ const miloLibs = setLibs(LIBS);
}());

(async function loadPage() {
const { loadArea, loadLana, setConfig, createTag } = await import(`${miloLibs}/utils/utils.js`);
const { loadArea, loadLana, setConfig, createTag, getMetadata } = await import(`${miloLibs}/utils/utils.js`);
if (getMetadata('template') === '404') window.SAMPLE_PAGEVIEWS_AT_RATE = 'high';
const metaCta = document.querySelector('meta[name="chat-cta"]');
if (metaCta && !document.querySelector('.chat-cta')) {
const isMetaCtaDisabled = metaCta?.content === 'off';
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const [setLibs, getLibs] = (() => {
(prodLibs, location) => {
libs = (() => {
const { hostname, search } = location || window.location;
if (!(hostname.includes('.hlx.') || hostname.includes('local'))) return prodLibs;
if (!['.hlx.', '.stage.', 'local'].some((i) => hostname.includes(i))) return prodLibs;
const branch = new URLSearchParams(search).get('milolibs') || 'main';
if (branch === 'local') return 'http://localhost:6456/libs';
return branch.includes('--') ? `https://${branch}.hlx.live/libs` : `https://${branch}--milo--adobecom.hlx.live/libs`;
Expand Down
Loading