feat(theme): add top placement for sections

- Add `placement: top|bottom` to the section frontmatter
- Override `DocContent` to render hoisted bands under the page title
- Derive the zebra stripe from list position so split bands stay continuous
- Opt marketing bands out of doc typography with `rp-not-doc`
- Point the legal and privacy contact address at legal@onixbyte.com
- Condense the products pages' body copy into their section frontmatter
This commit is contained in:
zihluwang committed 2026-09-25 18:04:49 +08:00
1 parent d21b8f6b2f
commit 9d095eba1b
15 files changed
+145 -54

No files matched your search

+7 -2
View File
@@ -8,6 +8,7 @@ import { Tags } from "./components/Tags"
import { Author } from "./components/Author"
import { SiteFooter } from "./components/SiteFooter"
import { HomeSections } from "./components/HomeSections"
import { DocContent } from "./components/DocContent"
function DocLayout(props: DocLayoutProps) {
return (
@@ -44,6 +45,10 @@ function DocLayout(props: DocLayoutProps) {
* than part of the prose column, so sections placed there stay full-bleed.
* `HomeSections` renders nothing without the frontmatter, and the two slots are
* never both live on the same page.
*
* A band marked `placement: top` is not rendered here at all — `DocContent`
* picks it up and slots it between the page title and the article body, and
* `afterDoc` renders the remaining bands. See `components/DocContent.tsx`.
*/
function Layout(props: LayoutProps) {
return (
@@ -64,7 +69,7 @@ function Layout(props: LayoutProps) {
afterDoc={
<>
{props.afterDoc}
<HomeSections />
<HomeSections placement="bottom" />
</>
}
/>
@@ -72,5 +77,5 @@ function Layout(props: LayoutProps) {
}
export * from "@rspress/core/theme-original"
export { DocLayout, Layout }
export { DocLayout, Layout, DocContent }
export { Kbd } from "./components/Kbd"