Skip to content

SEO Update #74

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
97 changes: 97 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@

# Block MJ12bot entirely
User-agent: MJ12bot
Disallow: /

# Block advertising-related bots
User-agent: Mediapartners-Google*
Disallow: /

# Block problematic crawlers and bots and site dupe crawlers
User-agent: UbiCrawler
Disallow: /

User-agent: DOC
Disallow: /

User-agent: Zao
Disallow: /

User-agent: sitecheck.internetseer.com
Disallow: /

User-agent: Zealbot
Disallow: /

User-agent: MSIECrawler
Disallow: /

User-agent: SiteSnagger
Disallow: /

User-agent: WebStripper
Disallow: /

User-agent: WebCopier
Disallow: /

User-agent: Fetch
Disallow: /

User-agent: Offline Explorer
Disallow: /

User-agent: Teleport
Disallow: /

User-agent: TeleportPro
Disallow: /

User-agent: WebZIP
Disallow: /

User-agent: linko
Disallow: /

User-agent: HTTrack
Disallow: /

User-agent: Microsoft.URL.Control
Disallow: /

User-agent: Xenu
Disallow: /

User-agent: larbin
Disallow: /

User-agent: libwww
Disallow: /

User-agent: ZyBORG
Disallow: /

User-agent: Download Ninja
Disallow: /

User-agent: fast
Disallow: /

User-agent: wget
Disallow: /

User-agent: grub-client
Disallow: /

User-agent: k2spider
Disallow: /

User-agent: NPBot
Disallow: /

User-agent: WebReaper
Disallow: /


# Allow full site access
User-agent: *
17 changes: 17 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://app.revnet.eth.sucks/</loc>
<lastmod>2025-06-27</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://app.revnet.eth.sucks/create</loc>
<lastmod>2025-06-27</lastmod>
<priority>0.6</priority>
</url>
<url>
<loc>https://app.revnet.eth.sucks/discover</loc>
<lastmod>2025-06-27</lastmod>
<priority>0.4</priority>
</url>
</urlset>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useJBProjectMetadataContext } from "juice-sdk-react";

const RichPreview = ({ source }: { source: string }) => {
useEffect(() => {
DOMPurify.addHook("afterSanitizeAttributes", function(node) {
DOMPurify.addHook("afterSanitizeAttributes", function (node) {
if (node.tagName === "A") {
node.setAttribute("target", "_blank");
node.setAttribute("rel", "noopener noreferrer");
Expand All @@ -19,20 +19,28 @@ const RichPreview = ({ source }: { source: string }) => {
}

try {
const purified = DOMPurify.sanitize(source)
// Convert markdown links [text](url) → <a href="url">text</a>
const withLinks = source.replace(
/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
'<a href="$2">$1</a>'
);

// Sanitize the generated HTML
const purified = DOMPurify.sanitize(withLinks);

return (
<div
className="break-words [&_a]:underline [&_a]:text-gray-600 [&_a:hover]:text-gray-800"
className="break-words [&_a]:text-gray-600 [&_a:hover]:text-gray-800 [&_a]:break-all [&_a]:underline"
dangerouslySetInnerHTML={{
__html: purified,
}}
/>
)
);
} catch (error) {
console.error("HTML sanitization failed:", error)
return <div className="break-words">{source}</div>
console.error("HTML sanitization failed:", error);
return <div className="break-words">{source}</div>;
}
}
};

export function DescriptionSection() {
const { metadata } = useJBProjectMetadataContext();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
import { EthereumAddress } from "@/components/EthereumAddress";
import { Badge } from "@/components/ui/badge";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { useBoostRecipient } from "@/hooks/useBoostRecipient";
import { useFormattedTokenIssuance } from "@/hooks/useFormattedTokenIssuance";
import { formatTokenSymbol } from "@/lib/utils";
import { ForwardIcon } from "@heroicons/react/24/solid";
import {
useEtherPrice,
useJBRulesetContext,
useJBTokenContext,
useSuckersTokenCashOutValue,
Expand All @@ -24,7 +15,6 @@ export function PriceSection({ className }: { className?: string }) {
});

const { ruleset, rulesetMetadata } = useJBRulesetContext();
const { data: ethPrice } = useEtherPrice();
const { token } = useJBTokenContext();
const { data: cashOutValue, loading: cashOutLoading } =
useSuckersTokenCashOutValue({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { QuestionMarkCircleIcon } from "@heroicons/react/24/outline";

export function SectionTooltip({
name,
Expand Down
5 changes: 4 additions & 1 deletion src/app/[...slug]/components/PayCard/PayOnSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ export function PayOnSelect() {
}}
defaultValue={selectedSucker?.peerChainId}
>
<SelectTrigger className="underline bg-transparent border-none p-0 h-auto text-md text-black-700">
<SelectTrigger
className="underline bg-transparent border-none p-0 h-auto text-md text-black-700"
aria-label="Select Chain"
>
<SelectValue placeholder="pick a chain" />
</SelectTrigger>
<SelectContent>
Expand Down
2 changes: 1 addition & 1 deletion src/app/create/form/ChainSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function ChainSelect({
defaultValue="production"
disabled={disabled}
>
<SelectTrigger className="col-span-1">
<SelectTrigger className="col-span-1" aria-label="Choose your chains">
<SelectValue />
</SelectTrigger>
<SelectContent>
Expand Down
66 changes: 65 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { twMerge } from "tailwind-merge";
import "./globals.css";
import { Providers } from "./providers";
import { headers } from "next/headers";
//import type { Metadata } from "next";
import type { Metadata } from "next";
import { metadata } from "@/lib/metadata"


import localFont from "next/font/local";
Expand Down Expand Up @@ -57,7 +59,7 @@ export default function RootLayout({
);
}


/*
export async function generateMetadata(): Promise<Metadata> {
const headersList = headers();
const host = headersList.get("host");
Expand Down Expand Up @@ -112,3 +114,65 @@ export async function generateMetadata(): Promise<Metadata> {
},
};
}
*/

export async function generateMetadata(): Promise<Metadata> {
const headersList = headers();
const host = headersList.get("host");
const proto = headersList.get("x-forwarded-proto") || "http";
const origin = `${proto}://${host}`;

const fullPath = "/";
const url = new URL(fullPath, origin);

const imgUrl = `${origin}/assets/img/anachronistic1-1.png`;

const frame = {
version: "next",
imageUrl: imgUrl,
button: {
title: metadata.description,
action: {
type: "launch_frame",
name: metadata.siteName,
url: url.href,
splashImageUrl: `${origin}/assets/img/small-bw-200x200.png`,
splashBackgroundColor: "#ffffff",
},
},
};

return {
title: metadata.siteName,
description: metadata.description,
alternates: {
canonical: url,
},
openGraph: {
title: metadata.siteName,
description: metadata.description,
siteName: metadata.siteName,
images: [
{
url: imgUrl,
width: 700,
height: 370,
alt: "Revnet preview image",
},
],
url: url,
type: "website",
},
twitter: {
title: metadata.siteName,
description: metadata.description,
card: "summary_large_image",
images: [imgUrl],
},
other: {
"fc:frame": JSON.stringify(frame),
},
manifest: metadata.manifest,
keywords: metadata.keywords,
};
}
8 changes: 5 additions & 3 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,16 @@ export default function Page() {
.
</li>
<li>
Support the $REV network{" "}
<Link
href="/eth:3"
aria-label="Support the REV network"
target="_blank"
rel="noopener norefererr"
className="underline"
>
here
Support the $REV network{" "}
<span className="underline">
here
</span>
</Link>
, we run as a revnet ourselves.
</li>
Expand Down
62 changes: 0 additions & 62 deletions src/components/charts/HistoricalExitValueChart.tsx

This file was deleted.

6 changes: 6 additions & 0 deletions src/lib/metadata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const metadata = {
keywords: "Revnet, web3, Juicebox",
manifest: "/manifest.json",
description: "Explore onchain revenue networks",
siteName: "Revnet",
};