fix: redirect docs in new page, handle 404 vercel url
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
<li class="text-gray-800 font-semibold text-sm cursor-pointer">Pricing</li>
|
||||
</a>
|
||||
<!-- Docs -->
|
||||
<a href="/docs">
|
||||
<a href="/docs" target="_blank">
|
||||
<li class="text-gray-800 font-semibold text-sm cursor-pointer">Docs</li>
|
||||
</a>
|
||||
<!-- Blog -->
|
||||
@@ -207,7 +207,7 @@
|
||||
<li
|
||||
class="text-gray-800 font-semibold text-sm md:text-lg cursor-pointer hover:bg-gray-100 py-3 px-4 rounded-md w-full"
|
||||
>
|
||||
<a on:click={handleShowNav} href="/docs"> Docs </a>
|
||||
<a on:click={handleShowNav} href="/docs" target="_blank"> Docs </a>
|
||||
</li>
|
||||
|
||||
<!-- Blog -->
|
||||
|
||||
@@ -31,6 +31,11 @@ export const load = async ({ url, cookies }): Promise<LoadOutput> => {
|
||||
const matches = url.host.match(/([a-z 0-9 -]+).*classroomio[.]com/);
|
||||
const subdomain = matches?.[1] ?? '';
|
||||
|
||||
if (!url.host.includes('.classroomio.com')) {
|
||||
// TODO: We can verify if custom domain here
|
||||
return response;
|
||||
}
|
||||
|
||||
if (!blockedSubdomain.includes(subdomain)) {
|
||||
const answer = Array.isArray(matches) ? !!subdomain && subdomain !== 'www' : false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user