Skip to content
Open
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
8 changes: 6 additions & 2 deletions landing-page/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ import { host, readCanisterIds } from "../frontend/scripts/readCanisterIds";

const canisterIds = readCanisterIds({});
const hostUrl = new URL(host);

let siteUrl;
if (hostUrl.port) {
process.env.PUBLIC_DAPP_URL = `${hostUrl.protocol}//${canisterIds.FRONTEND_CANISTER_ID}.${hostUrl.hostname}:${hostUrl.port}`;
siteUrl = `${hostUrl.protocol}//${canisterIds.MARKETING_CANISTER_ID}.${hostUrl.hostname}:${hostUrl.port}`;
} else {
process.env.PUBLIC_DAPP_URL = `${hostUrl.protocol}//${canisterIds.FRONTEND_CANISTER_ID}.${hostUrl.hostname}`;
siteUrl = `${hostUrl.protocol}//${canisterIds.MARKETING_CANISTER_ID}.${hostUrl.hostname}`;
}

// https://astro.build/config
export default defineConfig({});
export default defineConfig({
site: siteUrl,
});
2 changes: 1 addition & 1 deletion landing-page/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Sprites from '../components/Sprites.astro';
basic: {
title: `${title} — Request, share, and manage documents`,
type: 'website',
image: "/social.jpg"
image: `${Astro.site.href}social.jpg`
}
}}
extend={{
Expand Down