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

fix: meta canoncal, og:url, og:image tags should point to prod urls #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
Loading