Skip to content

Commit 4e5037b

Browse files
authored
Fix old blog post with broken images (#987)
* Fix old blog post with broken images * remove broken author images
1 parent 7bbd60b commit 4e5037b

File tree

9 files changed

+17
-11
lines changed

9 files changed

+17
-11
lines changed

_blogposts/archive/2020-03-26-generalize-uncurry.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,19 @@ message leaks the underlying encoding -- now all those limitations are gone!
5353

5454
**Previously:**
5555

56-
<img class="my-4" src="https://bucklescript.github.io/img/poly-error.png"/>
56+
<img src="/static/blog/archive/poly-error.png" className="my-4 mx-auto max-h-[500px]"/>
5757

58-
<img src="https://bucklescript.github.io/img/label-error.png"/>
58+
<img src="/static/blog/archive/label-error.png" className="my-4 mx-auto max-h-[500px]"/>
5959

60-
<img src="https://bucklescript.github.io/img/recursive-error.png"/>
60+
<img src="/static/blog/archive/recursive-error.png" className="my-4 mx-auto max-h-[500px]"/>
6161

6262
The error messages above are cryptic and hard to understand. And the limitation of not supporting recursive functions make uncurried support pretty weak.
6363

6464
Now those limitations are all gone, you can have polymorphic uncurried recursive functions and it support labels.
6565

66-
<img src="https://bucklescript.github.io/img/uncurry-label.png"/>
66+
<img src="/static/blog/archive/uncurry-label.png" className="my-4 mx-auto max-h-[500px]"/>
6767

68-
<img src="https://bucklescript.github.io/img/recursive.png"/>
68+
<img src="/static/blog/archive/recursive.png" className="my-4 mx-auto max-h-[500px]"/>
6969

7070
The error message is also enhanced significantly
7171

78.1 KB
Loading
43.2 KB
Loading
43.5 KB
Loading
47.2 KB
Loading
56.8 KB
Loading

src/Blog.res

+8-3
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,13 @@ module FeatureCard = {
132132
~firstParagraph: string="",
133133
~slug: string,
134134
) => {
135-
let authorImg = <img className="h-full w-full rounded-full" src=author.imgUrl />
136-
135+
let authorImg = switch author.imgUrl {
136+
| "" => React.null
137+
| imgUrl =>
138+
<div className="inline-block w-4 h-4 mr-2">
139+
<img className="h-full w-full rounded-full" src=imgUrl />
140+
</div>
141+
}
137142
<section
138143
className="flex sm:px-4 md:px-8 lg:px-0 flex-col justify-end lg:flex-row sm:items-center h-full">
139144
<div
@@ -166,7 +171,7 @@ module FeatureCard = {
166171
<h2 className="hl-1"> {React.string(title)} </h2>
167172
<div className="mb-6">
168173
<div className="flex items-center body-sm text-gray-40 mt-2 mb-5">
169-
<div className="inline-block w-4 h-4 mr-2"> authorImg </div>
174+
authorImg
170175
<div>
171176
<a
172177
className="hover:text-gray-60"

src/common/BlogFrontmatter.res

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ let authors = [
1313
username: "hongbo",
1414
fullname: "Hongbo Zhang",
1515
role: "Compiler & Build System",
16-
imgUrl: "https://pbs.twimg.com/profile_images/1369548222314598400/E2y46vrB_400x400.jpg",
16+
imgUrl: "",
1717
social: X("bobzhang1988"),
1818
},
1919
{
2020
username: "chenglou",
2121
fullname: "Cheng Lou",
2222
role: "Syntax & Tools",
23-
imgUrl: "https://pbs.twimg.com/profile_images/554199709909131265/Y5qUDaCB_400x400.jpeg",
23+
imgUrl: "",
2424
social: X("_chenglou"),
2525
},
2626
{
2727
username: "maxim",
2828
fullname: "Maxim Valcke",
2929
role: "Syntax Lead",
30-
imgUrl: "https://pbs.twimg.com/profile_images/970271048812974080/Xrr8Ob6J_400x400.jpg",
30+
imgUrl: "",
3131
social: X("_binary_search"),
3232
},
3333
{

tailwind.config.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default {
2424
content: [
2525
"./src/**/*.{mjs,js,res}",
2626
"./pages/**/*.{mjs,js,mdx}",
27+
"./_blogposts/**/*.mdx"
2728
],
2829
theme: {
2930
extend: {

0 commit comments

Comments
 (0)