Skip to content

Commit

Permalink
fix: 🐛 metadata base image url
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida committed Jun 20, 2024
1 parent 4fad0b7 commit d8d61a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ const configRemarkCalloutDirectives = {
// Environment
const env = import.meta.env.PROD
? 'production'
: 'staging';
: import.meta.env.DEV
? 'development'
: 'staging';

// https://astro.build/config
export default defineConfig({
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/BaseHtml.astro
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const baseUrl = getSiteUrl();
/>
<meta
property="og:image"
content={ogMeta?.image || settings.site.metadata.default.image}
content={`${baseUrl}/${ogMeta?.image.replace(/^\/+/, '') || settings.site.metadata.default.image.replace(/^\/+/, '')}`}
/>
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image" />
Expand Down
2 changes: 1 addition & 1 deletion src/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://fleek-xyz-staging.on-fleek.app"
},
"development": {
"url": "https://fleek-xyz-staging.on-fleek.app"
"url": "http://localhost:4321"
},
"metadata": {
"default": {
Expand Down

0 comments on commit d8d61a3

Please sign in to comment.