Skip to content
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

Add Open Graph image for Showcase and Builder Tools section #821

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
13 changes: 12 additions & 1 deletion src/pages/showcase/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useMemo, useCallback, useEffect } from "react";

import Head from '@docusaurus/Head';
import Layout from "@theme/Layout";
import ShowcaseTooltip from "@site/src/components/showcase/ShowcaseTooltip";
import ShowcaseTagSelect from "@site/src/components/showcase/ShowcaseTagSelect";
Expand Down Expand Up @@ -332,12 +332,23 @@ function SearchBar() {
);
}

// Add open graph image to showcase page
function MetaData() {
return (
<Head>
<meta property="og:image" content="https://developers.cardano.org/img/og/og-showcase.png" />
<meta name="twitter:image" content="https://developers.cardano.org/img/og/og-showcase.png" />
</Head>
)
}

function Showcase() {
const { selectedTags, toggleTag } = useSelectedTags();
const filteredProjects = useFilteredProjects();

return (
<Layout title={TITLE} description={DESCRIPTION}>
<MetaData />
<ShowcaseHeader />
<ShowcaseFilters selectedTags={selectedTags} toggleTag={toggleTag} />
<ShowcaseCards filteredProjects={filteredProjects} />
Expand Down
13 changes: 12 additions & 1 deletion src/pages/tools/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useMemo, useCallback, useEffect } from "react";

import Head from '@docusaurus/Head';
import Layout from "@theme/Layout";
import ShowcaseTooltip from "@site/src/components/showcase/ShowcaseTooltip";
import ShowcaseTagSelect from "@site/src/components/showcase/ShowcaseTagSelect";
Expand Down Expand Up @@ -331,12 +331,23 @@ function SearchBar() {
);
}

// Add open graph image to builder tool page
function MetaData() {
return (
<Head>
<meta property="og:image" content="https://developers.cardano.org/img/og/og-builder-tools.png" />
<meta name="twitter:image" content="https://developers.cardano.org/img/og/og-builder-tools.png" />
</Head>
)
}

function Showcase() {
const { selectedTags, toggleTag } = useSelectedTags();
const filteredProjects = useFilteredProjects();

return (
<Layout title={TITLE} description={DESCRIPTION}>
<MetaData/>
<ShowcaseHeader />
<ShowcaseFilters selectedTags={selectedTags} toggleTag={toggleTag} />
<ShowcaseCards filteredProjects={filteredProjects} />
Expand Down