Skip to content

Commit c09ef15

Browse files
committed
Switch blog default preview image
1 parent f6b2000 commit c09ef15

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

src/Blog.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Blog.res

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
module Link = Next.Link
1717

1818
let _rescriptDefaultImg = "https://res.cloudinary.com/dmm9n7v9f/image/upload/v1598616442/reason%20association/rescript-lang.org/art-3-rescript-launch_ovoibg.jpg"
19-
let planetPreviewImg = "https://res.cloudinary.com/dmm9n7v9f/image/upload/v1587479463/Reason%20Association/reasonml.org/reasonml_art2_1280_vhzxnz.png"
19+
let _planetPreviewImg = "https://res.cloudinary.com/dmm9n7v9f/image/upload/v1587479463/Reason%20Association/reasonml.org/reasonml_art2_1280_vhzxnz.png"
20+
21+
let defaultPreviewImg = "https://res.cloudinary.com/dmm9n7v9f/image/upload/v1598616442/Reason%20Association/rescript-lang.org/Art-3-rescript-launch_ovoibg.jpg"
2022

2123
// For encoding reasons, see https://shripadk.github.io/react/docs/jsx-gotchas.html
2224
let middleDotSpacer = " " ++ (Js.String.fromCharCode(183) ++ " ")
@@ -109,7 +111,7 @@ module BlogCard = {
109111
let className = "absolute top-0 h-full w-full object-cover"
110112
switch previewImg {
111113
| Some(src) => <img className src />
112-
| None => <img className src=planetPreviewImg />
114+
| None => <img className src=defaultPreviewImg />
113115
}
114116
}
115117
</a>
@@ -169,7 +171,7 @@ module FeatureCard = {
169171
let className = "absolute top-0 h-full w-full object-cover"
170172
switch previewImg {
171173
| Some(src) => <img className src />
172-
| None => <img className src=planetPreviewImg />
174+
| None => <img className src=defaultPreviewImg />
173175
}
174176
}
175177
</a>

src/Blog.resi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module Malformed: {
1212
}
1313
}
1414

15-
let planetPreviewImg: string
15+
let defaultPreviewImg: string
1616

1717
type params = {slug: string}
1818
type props = {

src/BlogArticle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/BlogArticle.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ let default = (props: props) => {
186186
title={title ++ " | ReScript Blog"}
187187
description=?{description->Js.Null.toOption}
188188
canonical=?{canonical->Js.Null.toOption}
189-
ogImage={previewImg->Js.Null.toOption->Belt.Option.getWithDefault(Blog.planetPreviewImg)}
189+
ogImage={previewImg->Js.Null.toOption->Belt.Option.getWithDefault(Blog.defaultPreviewImg)}
190190
/>
191191
<div className="mb-10 md:mb-20">
192192
<BlogHeader

0 commit comments

Comments
 (0)