Skip to content
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
48 changes: 42 additions & 6 deletions components/Meta.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,60 @@
type Props = {
title?: string;
description?: string;
keywords?: string;
ogDescription?: string;
ogImg?: any;
pageUrl?: string;
type?: string;
twitterDescription?: string;
twitterCard?: string;
jsonLd?: any;
};

import Head from "next/head";
import ogImage from "../public/images/docs-og.webp";
import { DEFAULT_META_TITLE, DEFAULT_META_DESCRIPTION, SITE_URL } from "../utils/text/seo";
import {
DEFAULT_META_TITLE,
DEFAULT_META_DESCRIPTION,
SITE_URL,
} from "../utils/text/seo";

const OG_IMAGE_URL = SITE_URL + ogImage.src;

export function Meta({ title = DEFAULT_META_TITLE, description = DEFAULT_META_DESCRIPTION}: Props) {

export function Meta({
title = DEFAULT_META_TITLE,
description = DEFAULT_META_DESCRIPTION,
keywords,
ogDescription,
ogImg = OG_IMAGE_URL,
pageUrl,
type = "website",
twitterDescription,
twitterCard,
jsonLd,
}: Props) {
return (
<Head>
<title>{title}</title>
<meta name="description" content={description} />
{keywords && <meta name="keywords" content={keywords} />}
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={OG_IMAGE_URL} />
<meta property="og:type" content="website" />
<meta property="og:description" content={ogDescription || description} />
{pageUrl && <meta property="og:url" content={SITE_URL + pageUrl} />}
<meta property="og:image" content={ogImg} />
<meta property="og:type" content={type} />
{twitterCard && <meta name="twitter:card" content={twitterCard} />}
<meta name="twitter:title" content={title} />
<meta
name="twitter:description"
content={twitterDescription || description}
/>
{jsonLd && (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
)}
</Head>
);
}
27 changes: 27 additions & 0 deletions pages/solana-yellowstone-geyser-grpc.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
import { Meta } from "../components/Meta";
import ogImage from "public/images/og-geyser-grpc.png";
import { SITE_URL } from "../utils/text/seo";

<Meta
title="Solana Geyser gRPC Streaming — Setup Guide | dRPC"
description="Stream real-time Solana data with Yellowstone Geyser gRPC via dRPC. Low-latency accounts, transactions, blocks & slots — quickstart with TypeScript in 5 minutes."
keywords="Solana Geyser gRPC, Yellowstone gRPC, Solana streaming, Solana real-time data, gRPC Solana, dRPC Geyser, Solana MEV bot data, Solana indexer, Solana websocket alternative, Solana account subscribe"
ogDescription="Real-time Solana data streaming with Yellowstone Geyser gRPC. Accounts, transactions, blocks & slots with minimal latency."
ogImg={SITE_URL + ogImage.src}
pageUrl="/docs/solana-yellowstone-geyser-grpc"
type="article"
twitterDescription="Real-time Solana data streaming via dRPC. Quickstart with TypeScript in 5 minutes."
twitterCard="summary_large_image"
jsonLd={{
"@context": "https://schema.org",
"@type": "TechArticle",
headline: "Solana Geyser gRPC Streaming — Setup Guide",
description:
"How to set up real-time Solana data streaming with Yellowstone Geyser gRPC via dRPC",
author: { "@type": "Organization", name: "dRPC" },
publisher: {
"@type": "Organization",
name: "dRPC",
url: "https://drpc.org",
},
url: "https://drpc.org/docs/solana-yellowstone-geyser-grpc",
mainEntityOfPage: "https://drpc.org/docs/solana-yellowstone-geyser-grpc",
proficiencyLevel: "Beginner",
programmingLanguage: "TypeScript",
dependencies: "@grpc/grpc-js, @grpc/proto-loader",
}}
/>

# Solana Yellowstone Geyser gRPC
Expand Down
Binary file added public/images/og-geyser-grpc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ const config: DocsThemeConfig = {
const { asPath } = router;
const extra = { canonical: `${DocsBaseURL}${asPath}` };

if (asPath === '/') {
if (asPath === "/") {
return {
titleTemplate: DEFAULT_META_TITLE,
description: DEFAULT_META_DESCRIPTION,
keywords: 'rpc documentation',
keywords: "rpc documentation",
...extra,
}
};
}

const checkDocsInfoPage = isDocsInfoPage(asPath);
Expand Down
Loading