You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank for your work and your explanations.
I read a lot of issues with this problem : "Mismatch between origin and baseUrl (dev).". But it's still not working for me.
I followed the instructions of your site Fruition.
My domain is arnauddeschamps.xyz
My DNS management
Browser cache TLL to respect existing headers
Turn Always Online feature to off
My worker
/* CONFIGURATION STARTS HERE */
/* Step 1: enter your domain name like fruitionsite.com */
const MY_DOMAIN = "arnauddeschamps.xyz";
/*
Step 2: enter your URL slug to page ID mapping
The key on the left is the slug (without the slash)
The value on the right is the Notion page ID
*/
const SLUG_TO_PAGE = {
"": "65d5ef362a3840be94648528ddeffc57",
};
/* Step 3: enter your page title and description for SEO purposes */
const PAGE_TITLE = "Page perso";
const PAGE_DESCRIPTION =
"";
/* Step 4: enter a Google Font name, you can choose from https://fonts.google.com */
const GOOGLE_FONT = "Rubik";
/* Step 5: enter any custom scripts you'd like */
const CUSTOM_SCRIPT = ``;
';
document.body.classList.remove('dark');
__console.environment.ThemeStore.setState({ mode: 'light' });
}
function toggle() {
if (document.body.classList.contains('dark')) {
onLight();
} else {
onDark();
}
}
function addDarkModeButton(device) {
const nav = device === 'web' ? document.querySelector('.notion-topbar').firstChild : document.querySelector('.notion-topbar-mobile');
el.className = 'toggle-mode';
el.addEventListener('click', toggle);
nav.appendChild(el);
// enable smart dark mode based on user-preference
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
onDark();
} else {
onLight();
}
// try to detect if user-preference change
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
toggle();
});
}
const observer = new MutationObserver(function() {
if (redirected) return;
const nav = document.querySelector('.notion-topbar');
const mobileNav = document.querySelector('.notion-topbar-mobile');
if (nav && nav.firstChild && nav.firstChild.firstChild
|| mobileNav && mobileNav.firstChild) {
redirected = true;
updateSlug();
addDarkModeButton(nav ? 'web' : 'mobile');
const onpopstate = window.onpopstate;
window.onpopstate = function() {
if (slugs.includes(getSlug())) {
const page = SLUG_TO_PAGE[getSlug()];
if (page) {
history.replaceState(history.state, 'bypass', '/' + page);
}
}
onpopstate.apply(this, [].slice.call(arguments));
updateSlug();
};
}
});
observer.observe(document.querySelector('#notion-app'), {
childList: true,
subtree: true,
});
const replaceState = window.history.replaceState;
window.history.replaceState = function(state) {
if (arguments[1] !== 'bypass' && slugs.includes(getSlug())) return;
return replaceState.apply(window.history, arguments);
};
const pushState = window.history.pushState;
window.history.pushState = function(state) {
const dest = new URL(location.protocol + location.host + arguments[2]);
const id = dest.pathname.slice(-32);
if (pages.includes(id)) {
arguments[2] = '/' + PAGE_TO_SLUG[id];
}
return pushState.apply(window.history, arguments);
};
const open = window.XMLHttpRequest.prototype.open;
window.XMLHttpRequest.prototype.open = function() {
arguments[1] = arguments[1].replace('${MY_DOMAIN}', 'www.notion.so');
return open.apply(this, [].slice.call(arguments));
};
</script>${CUSTOM_SCRIPT}`,
{
html: true
}
);
}
}
async function appendJavascript(res, SLUG_TO_PAGE) {
return new HTMLRewriter()
.on("title", new MetaRewriter())
.on("meta", new MetaRewriter())
.on("head", new HeadRewriter())
.on("body", new BodyRewriter(SLUG_TO_PAGE))
.transform(res);
}
I tried to purge all the cache.
It's still not working for me.
Have you any idea to solve this problem ?
Merci !!
The text was updated successfully, but these errors were encountered:
Hello,
Thank for your work and your explanations.
I read a lot of issues with this problem : "Mismatch between origin and baseUrl (dev).". But it's still not working for me.
I followed the instructions of your site Fruition.
My domain is arnauddeschamps.xyz
My DNS management

Browser cache TLL to respect existing headers
Turn Always Online feature to off
My worker

I tried to purge all the cache.
It's still not working for me.
Have you any idea to solve this problem ?
Merci !!
The text was updated successfully, but these errors were encountered: