Skip to content

Change og:site_name for Blog, BlogArticle and Packages #438

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

Merged
merged 1 commit into from
Sep 7, 2021
Merged
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
1 change: 1 addition & 0 deletions src/Blog.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ function $$default(props) {
return false;
});
return React.createElement(React.Fragment, undefined, React.createElement(Meta.make, {
siteName: "ReScript Blog",
description: "News, Announcements, Release Notes and more",
title: "Blog | ReScript Documentation"
}), React.createElement("div", {
Expand Down
8 changes: 3 additions & 5 deletions src/Blog.res
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,7 @@ module FeatureCard = {
{date->Util.Date.toDayMonthYear->React.string}
</div>
</div>
<p className="body-md text-gray-70">
{React.string(firstParagraph)}
</p>
<p className="body-md text-gray-70"> {React.string(firstParagraph)} </p>
</div>
</div>
<Link href="/blog/[slug]" _as={"/blog/" ++ slug}>
Expand Down Expand Up @@ -282,11 +280,11 @@ let default = (props: props): React.element => {
}

let overlayState = React.useState(() => false)
let title = "Blog | ReScript Documentation"

<>
<Meta
title="Blog | ReScript Documentation"
description="News, Announcements, Release Notes and more"
siteName="ReScript Blog" title description="News, Announcements, Release Notes and more"
/>
<div className="mt-16 pt-2">
<div className="text-gray-80 text-18">
Expand Down
1 change: 1 addition & 0 deletions src/BlogArticle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ function $$default(props) {
var description = match.description;
var title = match.title;
var tmp = {
siteName: "ReScript Blog",
title: title + " | ReScript Blog",
ogImage: Belt_Option.getWithDefault(Caml_option.null_to_opt(match.previewImg), Blog.defaultPreviewImg)
};
Expand Down
1 change: 1 addition & 0 deletions src/BlogArticle.res
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ let default = (props: props) => {
| Ok({date, author, co_authors, title, description, articleImg, previewImg}) =>
<div className="w-full">
<Meta
siteName="ReScript Blog"
title={title ++ " | ReScript Blog"}
description=?{description->Js.Null.toOption}
ogImage={previewImg->Js.Null.toOption->Belt.Option.getWithDefault(Blog.defaultPreviewImg)}
Expand Down
1 change: 1 addition & 0 deletions src/Packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ function $$default(props) {
return false;
});
return React.createElement(React.Fragment, undefined, React.createElement(Meta.make, {
siteName: "ReScript Packages",
description: "Official and unofficial resources, libraries and bindings for ReScript",
title: "Package Index | ReScript Documentation"
}), React.createElement("div", {
Expand Down
1 change: 1 addition & 0 deletions src/Packages.res
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ let default = (props: props) => {
let overlayState = React.useState(() => false)
<>
<Meta
siteName="ReScript Packages"
title="Package Index | ReScript Documentation"
description="Official and unofficial resources, libraries and bindings for ReScript"
/>
Expand Down