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

release v2.3.0 #795

Merged
merged 50 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
8c0dfcc
Update file structure for chainhook references. Add pages for stacks …
natebuch Aug 14, 2024
ddb4403
Standarize code highlights and parameter descriptions. Add regex cod…
natebuch Aug 14, 2024
5418271
Add reference page for bitcoin scopes.
natebuch Aug 16, 2024
bd1eb5b
Fix styling and content issues.
natebuch Aug 16, 2024
583af32
Update predicate design page.
natebuch Aug 16, 2024
eec069c
Create new concepts pages, update meta file.
natebuch Aug 16, 2024
051e380
Update predicate design page.
natebuch Aug 17, 2024
11798e6
Remove unneeded files.
natebuch Aug 17, 2024
fbcd8ad
Update file title. Fix issues with copy.
natebuch Aug 17, 2024
d4d40d4
Remove http_post from guide, update references to new predicate desig…
natebuch Aug 17, 2024
aaa6210
Update links to predicate design and stacks scope pages. Update copy …
natebuch Aug 19, 2024
e97227b
Add next steps to predicate design. Update next step links on observi…
natebuch Aug 19, 2024
eedd5bb
Merge branch 'main' into feat/chainhook_doc_updates
natebuch Aug 19, 2024
e83f25a
Remove bitcoin/stack predicate files after updating from main.
natebuch Aug 19, 2024
4036006
Fix links to scopes pages based on Bitcoin and/or Stacks context.
natebuch Aug 19, 2024
9b1f32a
Update content/docs/stacks/chainhook/concepts/predicate-design.mdx
natebuch Aug 19, 2024
7893de5
Update content/docs/stacks/chainhook/concepts/predicate-design.mdx
natebuch Aug 19, 2024
16b73a9
Add redirects to vercel.json.
natebuch Aug 19, 2024
867d8f1
Update scopes files names and references to those files.
natebuch Aug 19, 2024
fef62a8
Add note section in predicate-design for link to scopes in if_this se…
natebuch Aug 19, 2024
031ceaa
Update meta file for reference links.
natebuch Aug 19, 2024
85949a7
Fix capitalization in copy for contract-call guide, fix next step nam…
natebuch Aug 19, 2024
1196bd9
update redirects
ryanwaits Oct 10, 2024
2fcb419
create basic layout
ryanwaits Oct 11, 2024
68c1cc8
add callouts for platform api
ryanwaits Oct 11, 2024
d6dd2d7
add redirects for rpc endpoints that were previously inside hiro api …
ryanwaits Oct 14, 2024
a367ece
Update index.mdx
max-crawford Oct 17, 2024
b192e82
feat: update stacks.js to next
janniks Oct 18, 2024
dfd8422
chore: ensure bun install
janniks Oct 18, 2024
f370d73
chore: remove npm lockfile
janniks Oct 18, 2024
4d335a7
docs: update notes to latest
janniks Oct 22, 2024
092beed
add landing page
ryanwaits Oct 25, 2024
709a568
fix badge button styling
ryanwaits Oct 25, 2024
5fac7c1
add label
ryanwaits Oct 25, 2024
1c54752
update with new clarity 3 info
ryanwaits Oct 25, 2024
611b80a
add new clarity 3 functions
ryanwaits Oct 25, 2024
a771163
Merge pull request #791 from hirosystems/max-crawford-patch-2
ryanwaits Oct 25, 2024
6d2db22
remove root redirect
ryanwaits Oct 25, 2024
78615e9
Merge pull request #789 from hirosystems/chore/add-platform-api-callouts
ryanwaits Oct 25, 2024
75827c7
Merge pull request #788 from hirosystems/chore/redirects
ryanwaits Oct 25, 2024
390cb1a
docs: rename headers
janniks Oct 25, 2024
df5f411
Merge branch 'develop' into major/stacks.js-update
janniks Oct 25, 2024
237fbc5
Update page.tsx
max-crawford Oct 25, 2024
8a266a0
adjust some copy and styling
ryanwaits Oct 25, 2024
ef779b8
Merge pull request #794 from hirosystems/feat/landing-page
ryanwaits Oct 25, 2024
faad57a
Merge branch 'develop' into major/stacks.js-update
ryanwaits Oct 25, 2024
89158ae
Merge pull request #793 from hirosystems/major/stacks.js-update
ryanwaits Oct 25, 2024
70fb847
update migration guide url
ryanwaits Oct 25, 2024
d25e57e
Merge branch 'develop' into main
natebuch Oct 26, 2024
911340e
Merge pull request #736 from natebuch/main
ryanwaits Oct 26, 2024
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
2 changes: 1 addition & 1 deletion .env-example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NEXT_PUBLIC_ALGOLIA_APP_ID=
NEXT_PUBLIC_ALGOLIA_API_KEY=
NEXT_PUBLIC_ALGOLIA_INDEX=
NEXT_PUBLIC_GTM_ID=
NEXT_PUBLIC_GTM_ID=
4 changes: 4 additions & 0 deletions app/(docs)/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export default function Page({ params }: { params: Param }): JSX.Element {
] || secondSegment.charAt(0).toUpperCase() + secondSegment.slice(1));
}

if (page.slugs[1].toLowerCase() === "platform-api") {
prefix = "Platform API";
}

if (page.slugs[1].toLowerCase() === "token-metadata-api") {
prefix = "Token Metadata API";
}
Expand Down
4 changes: 2 additions & 2 deletions app/(docs)/layout.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ const itemVariants = cva(
true: "text-accent-foreground",
},
mode: {
bitcoin: "bg-[hsl(var(--hiro))]",
bitcoin: "bg-hiro",
stacks: "bg-background",
},
},
compoundVariants: [
{
active: true,
mode: "bitcoin",
className: "hsl(var(--hiro)) dark:text-background",
className: "bg-hiro dark:text-background",
},
{
active: true,
Expand Down
32 changes: 26 additions & 6 deletions app/(docs)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,38 @@ export const layoutOptions: Omit<DocsLayoutProps, "children"> = {
},
],
},
links: [
{
text: "Guides",
url: "/guides",
},
],
links: [],
sidebar: {
defaultOpenLevel: 0,
banner: <SidebarBanner />,
},
};

export const homeLayoutOptions: Omit<DocsLayoutProps, "children"> = {
tree: utils.pageTree,
nav: {
transparentMode: "top",
title: <DocsLogo className="size-28 hidden sm:block" />,
children: null,
links: [
{
label: "Hiro Platform",
href: "https://platform.hiro.so/",
icon: (
<div className="flex items-center gap-1 bg-secondary p-1.5 rounded-md">
<span className="ml-2 font-semibold max-md:hidden">
Hiro Platform
</span>
<ArrowUpRight />
</div>
),
external: true,
},
],
},
links: [],
};

export default function Layout({
children,
}: {
Expand Down
8 changes: 6 additions & 2 deletions app/(home)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { Layout } from "fumadocs-ui/layout";
import type { ReactNode } from "react";
import { layoutOptions } from "../(docs)/layout";
import { homeLayoutOptions } from "../(docs)/layout";

export default function HomeLayout({
children,
}: {
children: ReactNode;
}): JSX.Element {
return <Layout {...layoutOptions}>{children}</Layout>;
return (
<div className="max-w-7xl mx-auto *:border-none">
<Layout {...homeLayoutOptions}>{children}</Layout>
</div>
);
}
258 changes: 158 additions & 100 deletions app/(home)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,110 +1,168 @@
import Link from "next/link";
import { cn } from "@/utils/cn";
import { buttonVariants } from "@/components/ui/button";
import { CodeBlock } from "@/components/code-block";
import { Integration } from "./page.client";
import { StacksCardIcon, BitcoinCardIcon } from "@/components/ui/icon";
import { Card } from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import Link from "fumadocs-core/link";

export default function HomePage(): JSX.Element {
return (
<>
<div
className="absolute inset-x-0 top-[200px] h-[250px] max-md:hidden"
style={{
background:
"repeating-linear-gradient(to right, hsl(var(--border)), transparent 1px, transparent 50px), repeating-linear-gradient(to bottom, hsl(var(--border)), transparent 1px, transparent 50px)",
}}
/>
<main className="container relative max-w-[1250px] px-8 py-4 lg:py-16">
<div className="relative border-b">
<div className="grid grid-cols-1 bg-background border-r md:grid-cols-2 lg:grid-cols-3">
<div className="relative flex flex-col overflow-hidden border-l border-t px-6 py-10">
<h2 className="text-7xl font-extrabold font-sans">
Build on Bitcoin Layers.
</h2>
<ul className="my-8 flex flex-col gap-6">
<li>
<span className="font-medium">Guides and code samples.</span>
<span className="ml-2 text-muted-foreground">
Copy and paste your way to making things work.
</span>
</li>
<li>
<span className="font-medium">Interactive.</span>
<span className="ml-2 text-muted-foreground">
Play around and get results before installing anything.
</span>
</li>
<li>
<span className="font-medium">Fully open-source.</span>
<span className="ml-2 text-muted-foreground">
Open source, available on Github for contributions.
</span>
</li>
</ul>
<div className="w-full mt-auto flex flex-row flex-wrap *:flex-1 gap-2 border-t pt-8">
<Link
href="/stacks"
className={cn(
buttonVariants(),
"bg-[rgb(255,85,0)] hover:bg-[rgba(255,85,0,0.9)]"
)}
>
Get started
</Link>
<Link
href="/guides"
className={cn(
buttonVariants({
variant: "outline",
})
)}
>
View all guides
</Link>
</div>
<main className="container max-w-7xl mx-auto my-12 space-y-10">
<div className="space-y-1">
<h1 className="text-4xl font-bold text-gray-900">
Welcome to Hiro Docs.
</h1>
<h2 className="text-2xl font-bold text-muted-foreground">
Explore our tutorials, guides, API references, and more.
</h2>
</div>

<div className="grid md:grid-cols-2 gap-6 mb-16">
{/* Stacks Docs Card */}
<Link
href="/stacks"
className="not-prose block rounded-lg border bg-card p-4 text-md text-card-foreground transition-colors hover:bg-accent/80"
>
<div className="mb-6">
<div className="w-20 h-20 rounded-lg flex items-center justify-center mb-4">
<StacksCardIcon />
</div>
<h3 className="text-xl font-semibold mb-2">Stacks Docs</h3>
<p className="text-muted-foreground">Start building on Stacks.</p>
</div>

<Integration
className="border-t lg:col-span-2"
codeBlocks={[
{
key: "clarinet",
message: "Install now and start building!",
block: (
<CodeBlock
wrapper={{ className: "mt-2" }}
lang="bash"
code="brew install clarinet"
/>
),
},
{
key: "stacks.js",
message: "Try it in your terminal!",
block: (
<CodeBlock
wrapper={{ className: "mt-2" }}
lang="bash"
code="npx create stacks"
/>
),
},
{
key: "chainhook",
message: "Install now and start scanning!",
block: (
<CodeBlock
wrapper={{ className: "mt-2" }}
lang="bash"
code="brew install chainhook"
/>
),
},
]}
/>
<div className="flex flex-wrap gap-2">
<Badge
variant="secondary"
className="bg-background/95 text-gray-900"
>
CLARINET
</Badge>
<Badge
variant="secondary"
className="bg-background/95 text-gray-900"
>
CHAINHOOK
</Badge>
<Badge
variant="secondary"
className="bg-background/95 text-gray-900"
>
STACKS.JS
</Badge>
<Badge
variant="secondary"
className="bg-background/95 text-gray-900"
>
HIRO PLATFORM
</Badge>
<Badge
variant="secondary"
className="bg-background/95 text-gray-900"
>
STACKS API
</Badge>
<Badge
variant="secondary"
className="bg-background/95 text-gray-900"
>
TOKEN METADATA API
</Badge>
<Badge
variant="secondary"
className="bg-background/95 text-gray-900"
>
+3 MORE
</Badge>
</div>
</Link>
<Link
href="/bitcoin"
className="not-prose block rounded-lg border bg-card p-4 text-md text-card-foreground transition-colors hover:bg-accent/80"
>
<div className="mb-6">
<div className="w-20 h-20 rounded-lg flex items-center justify-center mb-4">
<BitcoinCardIcon />
</div>
<h3 className="text-xl font-semibold mb-2">Bitcoin Docs</h3>
<p className="text-muted-foreground">
Start building on Ordinals and Runes.
</p>
</div>
<div className="flex flex-wrap gap-2">
<Badge
variant="secondary"
className="bg-background/95 text-gray-900"
>
ORDHOOK
</Badge>
<Badge
variant="secondary"
className="bg-background/95 text-gray-900"
>
ORDINALS API
</Badge>
<Badge
variant="secondary"
className="bg-background/95 text-gray-900"
>
RUNES API
</Badge>
</div>
</Link>
</div>

<main className="space-y-6">
<div className="space-y-1">
<h2 className="text-2xl font-bold">Need help getting started?</h2>
<p className="text-xl text-muted-foreground">
Check out these resources.
</p>
</div>

<div className="grid md:grid-cols-4 gap-6">
<Link href="/stacks/get-started" className="block h-full">
<Card className="p-6 border bg-card h-full flex flex-col">
<h3 className="text-lg font-semibold mb-2">
Get started with Stacks
</h3>
<p className="text-muted-foreground text-sm flex-grow">
Build on Stacks with some of our most popular guides and
tutorials.
</p>
</Card>
</Link>
<Link href="/stacks/api" className="block h-full">
<Card className="p-6 border bg-card h-full flex flex-col">
<h3 className="text-lg font-semibold mb-2">
Stacks API Overview
</h3>
<p className="text-muted-foreground text-sm flex-grow">
View the API reference for the Stacks API.
</p>
</Card>
</Link>
<Link href="/bitcoin/get-started" className="block h-full">
<Card className="p-6 border bg-card h-full flex flex-col">
<h3 className="text-lg font-semibold mb-2">
Get started with Bitcoin
</h3>
<p className="text-muted-foreground text-sm flex-grow">
Build on Bitcoin with some of our most popular guides and
tutorials.
</p>
</Card>
</Link>
<Link href="/bitcoin/ordinals/api" className="block h-full">
<Card className="p-6 border bg-card h-full flex flex-col">
<h3 className="text-lg font-semibold mb-2">
Ordinals API Overview
</h3>
<p className="text-muted-foreground text-sm flex-grow">
View the API reference for our Ordinals API.
</p>
</Card>
</Link>
</div>
</main>
</>
</main>
);
}
Loading
Loading