Skip to content

Commit f26bcfd

Browse files
committed
correct meta
1 parent 1fe61bd commit f26bcfd

File tree

2 files changed

+30
-19
lines changed

2 files changed

+30
-19
lines changed

client/app/root.tsx

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,43 @@
1919
import {
2020
Links,
2121
Meta,
22+
type MetaFunction,
2223
Outlet,
2324
Scripts,
2425
ScrollRestoration,
26+
type MetaDescriptor,
2527
} from "@remix-run/react";
2628
import cx from "classnames";
2729

30+
export const DEFAULT_META: MetaDescriptor[] = [
31+
{
32+
title: "Reproducible Data Science | Open Research | Renku",
33+
},
34+
{
35+
name: "description",
36+
content:
37+
"An open-source platform for reproducible and collaborative data science. Share code, data and computational environments whilst tracking provenance and lineage of research objects.",
38+
},
39+
{
40+
property: "og:title",
41+
content: "Reproducible Data Science | Open Research | Renku",
42+
},
43+
{
44+
property: "og:description",
45+
content:
46+
"Work together on data science projects reproducibly. Share code, data and computational environments whilst accessing free computing resources.",
47+
},
48+
];
49+
50+
export const meta: MetaFunction = () => {
51+
return DEFAULT_META;
52+
};
53+
2854
export default function Root() {
2955
return (
3056
<html lang="en">
3157
<head>
3258
<meta charSet="utf-8" />
33-
<meta
34-
name="description"
35-
content="An open-source platform for reproducible and collaborative data science. Share code, data and computational environments whilst tracking provenance and lineage of research objects."
36-
/>
37-
38-
<meta
39-
property="og:title"
40-
content="Reproducible Data Science | Open Research | Renku"
41-
/>
42-
<meta
43-
property="og:description"
44-
// eslint-disable-next-line spellcheck/spell-checker
45-
content="Work together on data science projects reproducibly. Share code, data and computational environments whilst accessing free computing resources."
46-
/>
4759

4860
<meta
4961
name="viewport"
@@ -74,8 +86,6 @@ export default function Root() {
7486
href="/favicon-16x16.png"
7587
/>
7688
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
77-
78-
<title>Reproducible Data Science | Open Research | Renku</title>
7989
<Meta />
8090
<Links />
8191
</head>

client/app/routes/v2.projects.$namespace.$slug/route.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@
1818

1919
import {
2020
json,
21-
type LoaderFunctionArgs,
2221
type LoaderFunction,
22+
type LoaderFunctionArgs,
2323
type MetaFunction,
2424
} from "@remix-run/node";
25-
import { env } from "node:process";
2625
import { startCase } from "lodash-es";
26+
import { env } from "node:process";
2727

2828
import { type Project } from "~/old-src/features/projectsV2/api/projectV2.api";
2929
import App from "~/old-src/newIndex";
30+
import { DEFAULT_META } from "~/root";
3031

3132
export async function loader({
3233
params,
@@ -64,7 +65,7 @@ export async function loader({
6465

6566
export const meta: MetaFunction<typeof loader> = ({ data }) => {
6667
if (!data.ok) {
67-
return [];
68+
return DEFAULT_META;
6869
}
6970

7071
const { name, visibility, description } = data.project as Project;

0 commit comments

Comments
 (0)