From 51b8013d8ddc69444ec33942603bc00e4b8b8f72 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 3 Sep 2026 17:39:32 +0800 Subject: [PATCH 1/3] feat: restyle the homepage with a hero section Replace the plain markdown rendering with a centered hero (title, tagline, Get started / GitHub buttons) followed by three feature cards, and hide the table of contents so the page reads as a homepage rather than a doc page. The prose content and the API map table are unchanged. --- src/css/custom.css | 61 +++++++++++++++++++++++++++++++ src/pages/{index.md => index.mdx} | 49 ++++++++++++++++++++++++- 2 files changed, 108 insertions(+), 2 deletions(-) rename src/pages/{index.md => index.mdx} (84%) diff --git a/src/css/custom.css b/src/css/custom.css index d589045..d3f86bb 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -26,6 +26,67 @@ --ifm-code-font-size: 95%; } +/* Homepage hero */ +.hero--home { + padding: 4rem 0 2.5rem; + text-align: center; + background: none; +} + +.hero--home .hero__title { + margin-bottom: 1rem; + font-size: 2.8rem; + letter-spacing: -0.02em; +} + +.hero--home .hero__title small { + color: var(--ifm-color-primary); + font-size: 0.8rem; + font-weight: 700; + letter-spacing: 0.08em; + text-transform: uppercase; + vertical-align: middle; +} + +.hero--home .hero__subtitle { + max-width: 620px; + margin: 0 auto 1.75rem; + font-size: 1.1rem; +} + +.hero--home .hero__actions { + display: flex; + gap: 0.75rem; + justify-content: center; +} + +/* Homepage feature cards */ +.home-features { + margin: 0 0 1rem; +} + +.home-features .col { + display: flex; + margin-bottom: 1rem; +} + +.home-feature { + width: 100%; + padding: 1.25rem; + border: 1px solid var(--ifm-color-emphasis-200); + border-radius: 8px; +} + +.home-feature h3 { + margin-top: 0; + font-size: 1.05rem; +} + +.home-feature p { + margin-bottom: 0; + font-size: 0.9rem; +} + /* Incubating badge next to the project name */ .navbar__title::after { margin-left: 0.5rem; diff --git a/src/pages/index.md b/src/pages/index.mdx similarity index 84% rename from src/pages/index.md rename to src/pages/index.mdx index ec3e544..36eacc7 100644 --- a/src/pages/index.md +++ b/src/pages/index.mdx @@ -5,11 +5,56 @@ # file to you under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at https://www.apache.org/licenses/LICENSE-2.0. -title: Welcome to Apache Asyncband (Incubating) description: Apache Asyncband is a runtime-agnostic library providing synchronization and coordination tools for asynchronous Rust programming. +hide_table_of_contents: true --- -# Welcome to Apache Asyncband (Incubating) +
+

+ Apache Asyncband (Incubating) +

+

+ Runtime-agnostic synchronization and coordination tools for asynchronous Rust programming. +

+
+ + Get started + + + View on GitHub + +
+
+ +
+
+
+

Runtime-agnostic

+

+ Built on standard futures and wakers. Poll Asyncband futures with Tokio, async-std, smol, a + custom executor, or any other standards-based runtime. +

+
+
+
+
+

Composable building blocks

+

+ Synchronization, initialization, task coordination, channels, resource reuse, and workload + control without choosing an executor for the application. +

+
+
+
+
+

Async first

+

+ Primitives are designed for async use; synchronous code drives them through a blocking + boundary adapter instead of a second family of APIs. +

+
+
+
## Overview From 0d6e3c0a52d45750cb5034304ecdfb2803021a1d Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 3 Sep 2026 19:43:56 +0800 Subject: [PATCH 2/3] fix: rebuild the homepage as a React page The MDX hero was mangled twice over: Infima's .hero class is a flex row, and oxfmt re-wrapping the JSX made MDX hoist the tagline text out of its element. Render the hero and feature cards from src/pages/index.tsx (where JSX is just JSX) and keep the prose as pure Markdown in src/pages/_home-content.md. The hero is now a full-width band above the container, and the prose is constrained to a readable 760px column. --- README.md | 2 +- src/css/custom.css | 33 ++++++---- src/pages/{index.mdx => _home-content.md} | 65 +++----------------- src/pages/index.tsx | 73 +++++++++++++++++++++++ tsconfig.json | 3 + 5 files changed, 106 insertions(+), 70 deletions(-) rename src/pages/{index.mdx => _home-content.md} (78%) create mode 100644 src/pages/index.tsx diff --git a/README.md b/README.md index 56ea333..85e8c79 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The local site is available at `http://localhost:3000/` by default. ## Writing documentation -Pages live under `src/pages/` as Markdown files. The homepage is `src/pages/index.md`. Each page starts with frontmatter for its title and metadata; the rest of the file is Markdown. +Pages live under `src/pages/`. The homepage is `src/pages/index.tsx`, with its prose content in `src/pages/_home-content.md`. Markdown pages start with frontmatter for their title and metadata; the rest of the file is Markdown. Fenced `bash` and `rust` code blocks are highlighted during the build. Docusaurus also supports MDX components when a page needs behavior beyond Markdown. diff --git a/src/css/custom.css b/src/css/custom.css index d3f86bb..d9ebf31 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -27,34 +27,36 @@ } /* Homepage hero */ -.hero--home { - padding: 4rem 0 2.5rem; +.home-hero { + padding: 4.5rem 0; text-align: center; - background: none; + background: linear-gradient(180deg, #eef3f8 0%, #ffffff 100%); + border-bottom: 1px solid var(--ifm-color-emphasis-200); } -.hero--home .hero__title { - margin-bottom: 1rem; - font-size: 2.8rem; +.home-hero__title { + margin: 0 0 1rem; + font-size: 3rem; letter-spacing: -0.02em; } -.hero--home .hero__title small { +.home-hero__title small { color: var(--ifm-color-primary); - font-size: 0.8rem; + font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle; } -.hero--home .hero__subtitle { +.home-hero__tagline { max-width: 620px; margin: 0 auto 1.75rem; - font-size: 1.1rem; + color: var(--ifm-color-emphasis-700); + font-size: 1.15rem; } -.hero--home .hero__actions { +.home-hero__actions { display: flex; gap: 0.75rem; justify-content: center; @@ -62,7 +64,7 @@ /* Homepage feature cards */ .home-features { - margin: 0 0 1rem; + margin: 3rem auto 2rem; } .home-features .col { @@ -87,6 +89,13 @@ font-size: 0.9rem; } +/* Homepage prose */ +.home-content { + max-width: 760px; + margin: 0 auto; + padding-bottom: 3rem; +} + /* Incubating badge next to the project name */ .navbar__title::after { margin-left: 0.5rem; diff --git a/src/pages/index.mdx b/src/pages/_home-content.md similarity index 78% rename from src/pages/index.mdx rename to src/pages/_home-content.md index 36eacc7..e968537 100644 --- a/src/pages/index.mdx +++ b/src/pages/_home-content.md @@ -1,60 +1,11 @@ ---- -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at https://www.apache.org/licenses/LICENSE-2.0. -description: Apache Asyncband is a runtime-agnostic library providing synchronization and coordination tools for asynchronous Rust programming. -hide_table_of_contents: true ---- - -
-

- Apache Asyncband (Incubating) -

-

- Runtime-agnostic synchronization and coordination tools for asynchronous Rust programming. -

-
- - Get started - - - View on GitHub - -
-
- -
-
-
-

Runtime-agnostic

-

- Built on standard futures and wakers. Poll Asyncband futures with Tokio, async-std, smol, a - custom executor, or any other standards-based runtime. -

-
-
-
-
-

Composable building blocks

-

- Synchronization, initialization, task coordination, channels, resource reuse, and workload - control without choosing an executor for the application. -

-
-
-
-
-

Async first

-

- Primitives are designed for async use; synchronous code drives them through a blocking - boundary adapter instead of a second family of APIs. -

-
-
-
+ ## Overview diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..59ef2ec --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,73 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more contributor +// license agreements. See the NOTICE file distributed with this work for +// additional information regarding copyright ownership. The ASF licenses this +// file to you under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy of +// the License at https://www.apache.org/licenses/LICENSE-2.0. + +import Layout from '@theme/Layout'; +import type { ReactNode } from 'react'; +import HomeContent from './_home-content.md'; + +export default function Home(): ReactNode { + return ( + +
+
+

+ Apache Asyncband (Incubating) +

+

+ Runtime-agnostic synchronization and coordination tools for asynchronous Rust + programming. +

+ +
+
+
+
+
+
+

Runtime-agnostic

+

+ Built on standard futures and wakers. Poll Asyncband futures with Tokio, async-std, + smol, a custom executor, or any other standards-based runtime. +

+
+
+
+
+

Composable building blocks

+

+ Synchronization, initialization, task coordination, channels, resource reuse, and + workload control without choosing an executor for the application. +

+
+
+
+
+

Async first

+

+ Primitives are designed for async use; synchronous code drives them through a + blocking boundary adapter instead of a second family of APIs. +

+
+
+
+
+ +
+
+
+ ); +} diff --git a/tsconfig.json b/tsconfig.json index 469b805..ba1dd0a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "@docusaurus/tsconfig", + "compilerOptions": { + "types": ["node", "@docusaurus/module-type-aliases"] + }, "exclude": ["node_modules", "build"] } From 2639b5337a83e6b90b6b39a3b437339ae5f7e818 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 3 Sep 2026 20:57:27 +0800 Subject: [PATCH 3/3] fix: restore syntax highlighting in homepage code blocks Imported MDX content only receives the theme component mapping (Prism highlighting, code block chrome) when rendered inside @theme/MDXContent. --- src/pages/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 59ef2ec..08b7a1d 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -5,6 +5,7 @@ // use this file except in compliance with the License. You may obtain a copy of // the License at https://www.apache.org/licenses/LICENSE-2.0. +import MDXContent from '@theme/MDXContent'; import Layout from '@theme/Layout'; import type { ReactNode } from 'react'; import HomeContent from './_home-content.md'; @@ -65,7 +66,9 @@ export default function Home(): ReactNode {
- + + +