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(website): fix broken open graph images #2065

Merged
merged 2 commits into from
Jul 6, 2024
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions modelina-website/src/components/layouts/Head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export interface HeadProps {
export default function HeadComponent({
title,
description = 'Open source tools to easily build and maintain your event-driven architecture. All powered by the AsyncAPI specification, the industry standard for defining asynchronous APIs.',
image = '/img/social/website-card.jpg'
image = '/img/card/website-card.jpg'
}: HeadProps) {
const url = process.env.DEPLOY_PRIME_URL || process.env.DEPLOY_URL;
const url = 'https://modelina.org';
Copy link
Member

@devilkiller-ag devilkiller-ag Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can set an environment variable for this in the netlify instead of directly mentioning it here and use it as it was used earlier.

cc: @jonaslagoni

Copy link
Contributor Author

@jerensl jerensl Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devilkiller-ag Make sure to start with NEXT_PUBLIC_ (process.env.NEXT_PUBLIC_DEPLOY_URL), if you want to include the environment variable on the browser

https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables#bundling-environment-variables-for-the-browser

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@devilkiller-ag devilkiller-ag Jul 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added the environment variable on the Netlify with the name 'NEXT_PUBLIC_DEPLOY_URL'

const { path } = useContext(AppContext);
const permalink = `${url}${path}`;
let type = 'website';
Expand Down
Loading