Files
soulseek-rs-modded/website/src/lib/routes.ts
T
Michel de Graaf e4546e5940 docs(website): fold the docs page into five parts and drop the byline
The docs page carried three daemon sections in a row, each with its own
numbered head, so the one story the daemon tells read as three. They are now
sub-heads under 5 · the daemon. The agents section is gone, first run points
at /install instead of assuming Homebrew, and the layout section shows the
demo next to the pane descriptions rather than describing boxes nobody sees.

The footer no longer signs the project with a personal name, and the TUI
demo no longer shows a home directory that only exists on one machine.

Community picks up the sharing etiquette cards and SeeleSeek; install and
home lose a few em-dashes.
2026-07-29 11:24:18 +02:00

47 lines
1.4 KiB
TypeScript

export interface RouteMeta {
path: string
title: string
description: string
}
export const ROUTES = [
{
path: '/',
title: 'soulseek-rs, a Soulseek client for your terminal',
description:
'soulseek-rs is a keyboard-driven Soulseek client and a Rust protocol library. Search, share, browse, and chat from your terminal.',
},
{
path: '/install',
title: 'soulseek-rs, install',
description:
'Install the soulseek-rs client with cargo, build it from source, or depend on the protocol library and write your own client.',
},
{
path: '/docs',
title: 'soulseek-rs, docs',
description:
'Quick start for soulseek-rs: install, run, drive it from the keyboard, and use the shell subcommands.',
},
{
path: '/community',
title: 'soulseek-rs, community',
description:
'Soulseek etiquette: what sharing asks of you, how to help with soulseek-rs, and where to go when another client fits you better.',
},
] as const satisfies readonly RouteMeta[]
export type RoutePath = (typeof ROUTES)[number]['path']
export const NOT_FOUND_META: RouteMeta = {
path: '/404',
title: 'soulseek-rs, not found',
description: 'That page does not exist.',
}
export const metaFor = (pathname: string): RouteMeta => {
const trimmed =
pathname.length > 1 && pathname.endsWith('/') ? pathname.slice(0, -1) : pathname
return ROUTES.find((route) => route.path === trimmed) ?? NOT_FOUND_META
}