mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Merge pull request #3 from archtika/devel
Set website production url correctly for NGINX
This commit is contained in:
@@ -60,9 +60,16 @@ export const load: PageServerLoad = async ({ params, fetch, cookies, parent }) =
|
|||||||
: "http://localhost:18000"
|
: "http://localhost:18000"
|
||||||
}/previews/${websiteOverview.id}/index.html`;
|
}/previews/${websiteOverview.id}/index.html`;
|
||||||
|
|
||||||
|
const websiteProdUrl = dev
|
||||||
|
? `http://localhost:18000/${websiteOverview.id}/index.html`
|
||||||
|
: process.env.ORIGIN
|
||||||
|
? process.env.ORIGIN.replace("//", `//${websiteOverview.id}.`)
|
||||||
|
: `http://localhost:18000/${websiteOverview.id}/index.html`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
websiteOverview,
|
websiteOverview,
|
||||||
websitePreviewUrl,
|
websitePreviewUrl,
|
||||||
|
websiteProdUrl,
|
||||||
website
|
website
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
|
|
||||||
const { data, form }: { data: PageServerData; form: ActionData } = $props();
|
const { data, form }: { data: PageServerData; form: ActionData } = $props();
|
||||||
|
|
||||||
const prodWebsiteUrl = data.websitePreviewUrl.replace("/previews", "");
|
|
||||||
|
|
||||||
let sending = $state(false);
|
let sending = $state(false);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -56,7 +54,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Your website is published at:
|
Your website is published at:
|
||||||
<br />
|
<br />
|
||||||
<a href={prodWebsiteUrl}>{prodWebsiteUrl}</a>
|
<a href={data.websiteProdUrl}>{data.websiteProdUrl}</a>
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user