From a9a891cc3f20638f4da15d32dfa04c4f327e239c Mon Sep 17 00:00:00 2001 From: Prabal Date: Fri, 4 Sep 2026 16:44:28 +0400 Subject: [PATCH 1/3] =?UTF-8?q?v2.3.0=20=E2=80=94=20Fix=20agentic=20readab?= =?UTF-8?q?ility=20blockers=20(is-agentic=2064/100)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scanned docs.availproject.org against is-agentic.com and fixed the failing checks. No human-facing content or layout was altered; the three new pages were added at the maintainer's request. Server-rendered content (Essential — was failing) Every page served ~0 chars of content in raw HTML. NexusContainer returned a full-page until a useEffect read localStorage, and Web3Provider wraps the whole app, so the server emitted a skeleton for the entire body. Existing canonical URLs and TechArticle/BreadcrumbList JSON-LD never reached the HTML either. NexusProvider builds its client inside useEffect([config]) with destroy() cleanup, so it is SSR-safe and rebuilds correctly when the stored network differs from the default. Dropping the gate is therefore safe. / 35 -> 1584 chars /docs/da/get-started 54 -> 2541 chars /docs/nexus 40 -> 966 chars Markdown content negotiation (Essential — was failing) - middleware rewrote /docs/da/* to /api/markdown/DA/*, but content is canonicalized lowercase, so every Avail DA page 404'd on both the Accept: text/markdown and .md paths. Uppercase /api/markdown/DA/* 404'd as well. Both casings now resolve. - Vary was emitted as a second header line, which CDNs and scanners commonly miss. Now one merged value, with Accept first. Agent-friendly 404s (Essential — was partial) 404s return a markdown body naming the discovery indexes instead of an opaque JSON error, keeping the 404 status. Structured data and metadata (Recommended — were failing) - Homepage: canonical URL plus an Organization/WebSite/SoftwareApplication @graph, with contactPoint and sameAs built only from links already in the repo. - Docs pages: the 3-field Organization stub replaced with the full node. Discoverability - /about, /contact, /privacy added (previously 404). Privacy documents only verified behaviour, and discloses that feedback is filed to a public GitHub repo. - sitemap.xml now includes the homepage and these pages; it previously listed docs pages only. - llms.txt gains an Agent Endpoints section. Tests updated: the markdown API and middleware suites asserted the uppercase-DA behaviour that was breaking production. 100 vitest + 1 jest pass; Biome error count unchanged from main (121). Co-Authored-By: Claude Opus 5 --- src/app/(home)/about/page.tsx | 71 ++++++++++++++++ src/app/(home)/contact/page.tsx | 71 ++++++++++++++++ src/app/(home)/page.tsx | 11 +++ src/app/(home)/privacy/page.tsx | 99 +++++++++++++++++++++++ src/app/api/markdown/[...slug]/route.ts | 9 ++- src/app/api/markdown/markdown-api.test.ts | 11 ++- src/app/api/markdown/route.ts | 3 +- src/app/docs/[[...slug]]/page.tsx | 11 ++- src/app/not-found.tsx | 18 ++++- src/app/sitemap.test.ts | 16 +++- src/app/sitemap.ts | 21 ++++- src/components/info/info-page.tsx | 63 +++++++++++++++ src/lib/agent-headers.ts | 12 ++- src/lib/agent-not-found.ts | 49 +++++++++++ src/lib/footer-links.ts | 3 + src/lib/llms.ts | 17 ++++ src/lib/structured-data.ts | 92 +++++++++++++++++++++ src/middleware.test.ts | 27 +++++-- src/middleware.ts | 41 ++++------ src/providers/Web3Provider.tsx | 12 +-- 20 files changed, 595 insertions(+), 62 deletions(-) create mode 100644 src/app/(home)/about/page.tsx create mode 100644 src/app/(home)/contact/page.tsx create mode 100644 src/app/(home)/privacy/page.tsx create mode 100644 src/components/info/info-page.tsx create mode 100644 src/lib/agent-not-found.ts create mode 100644 src/lib/structured-data.ts diff --git a/src/app/(home)/about/page.tsx b/src/app/(home)/about/page.tsx new file mode 100644 index 0000000..2173b31 --- /dev/null +++ b/src/app/(home)/about/page.tsx @@ -0,0 +1,71 @@ +import { InfoPage, InfoSection } from "@/components/info/info-page"; +import { SITE_URL } from "@/lib/structured-data"; + +export const metadata = { + title: "About", + description: + "About the Avail documentation site — what Avail DA and Avail Nexus are, who maintains these docs, and how the content is organised.", + alternates: { canonical: `${SITE_URL}/about` }, +}; + +export default function AboutPage() { + return ( + + +

+ Avail is a modular blockchain stack. It is split into two products, + and this site documents both of them. +

+

+ Avail DA is a data availability layer. Rollups and + other chains post their transaction data to Avail DA and can prove + that the data was published, without every participant having to + download all of it. The docs cover submitting and reading data, + running full nodes and validators, light clients, network endpoints + and chain specs, and the node API across TypeScript, Rust and Go. +

+

+ Avail Nexus is a cross-chain unification layer. It + gives applications a single balance and a single transaction flow + across many chains, through an SDK or through drop-in UI widgets. The + docs cover the SDK reference, bridging, swaps, supported chains and + tokens, and the widget components. +

+
+ + +

+ Content is split by product: everything under /docs/da is + Avail DA, and everything under /docs/nexus is Avail + Nexus. Each product has its own Get Started path, conceptual material, + and API reference. +

+
+ + +

+ These docs are published in machine-readable form as well as HTML.{" "} + /llms.txt is an intent-based index of the + whole site, with per-product dumps at{" "} + /llms-da.txt and{" "} + /llms-nexus.txt. Any documentation URL + returns clean markdown if you append .md to it or send an{" "} + Accept: text/markdown header, and structured reference + data is available at{" "} + /api/reference.json. +

+
+ + +

+ Every page has a feedback control, and the docs are open source. If + something here is wrong or missing, please tell us — see{" "} + Contact for the ways to reach the team. +

+
+
+ ); +} diff --git a/src/app/(home)/contact/page.tsx b/src/app/(home)/contact/page.tsx new file mode 100644 index 0000000..873ea23 --- /dev/null +++ b/src/app/(home)/contact/page.tsx @@ -0,0 +1,71 @@ +import { InfoPage, InfoSection } from "@/components/info/info-page"; +import { SITE_URL } from "@/lib/structured-data"; + +export const metadata = { + title: "Contact", + description: + "How to reach the Avail team — developer support on Discord, documentation issues on GitHub, security disclosures, and business enquiries.", + alternates: { canonical: `${SITE_URL}/contact` }, +}; + +export default function ContactPage() { + return ( + + +

+ For build questions, integration help, and anything about running + nodes, the fastest route is the community. Ask in the{" "} + Avail Discord, + where the engineering team is active, or in the{" "} + Avail Telegram community. +

+
+ + +

+ If a page is wrong, out of date, or missing, use the feedback control + at the bottom of that page — it goes straight to the docs backlog. You + can also open an issue in the{" "} + + Avail GitHub organisation + {" "} + against the relevant repository. +

+
+ + +

+ Please do not report vulnerabilities in public channels. Email{" "} + + security@availproject.org + + . Scope, rewards, and the disclosure process are described in the{" "} + bug bounty documentation. +

+
+ + +

+ For partnership, integration, and commercial enquiries — including + access to Turbo DA — email{" "} + + business@availproject.org + + . +

+
+ + +

+ Announcements and updates are posted on{" "} + X. General information about + the project, including the team and open roles, lives on the{" "} + main Avail website. +

+
+
+ ); +} diff --git a/src/app/(home)/page.tsx b/src/app/(home)/page.tsx index de4fdc9..451b5fb 100644 --- a/src/app/(home)/page.tsx +++ b/src/app/(home)/page.tsx @@ -3,10 +3,21 @@ import { HeroSection } from "@/components/home/hero-section"; import { HomeControls } from "@/components/home/home-controls"; import { ProductGrid } from "@/components/home/product-grid"; import { SiteFooter } from "@/components/home/site-footer"; +import { SITE_URL, websiteLd } from "@/lib/structured-data"; + +export const metadata = { + alternates: { canonical: SITE_URL }, +}; export default function HomePage() { return (
+ {/* Site identity for agents — not rendered */} +