Add a footer and an in-app docs viewer
Footer (in the authenticated app layout, matching where Nav lives): copyright line, a Docs link, and a link to the project repo. Docs viewer: /docs lists docs/API.md, CONFIG_REFERENCE.md, and ARCHITECTURE.md; /docs/[slug] renders one via react-markdown + remark-gfm (tables, fenced code) inside a Tailwind Typography `prose` block, dark-mode aware via prose-invert. The markdown files themselves stay the single source of truth at the repo's docs/ - the app reads them at request time rather than duplicating their content, resolved from the app's cwd the same way config paths already are, since a compiled Route Handler's module graph doesn't preserve source-relative paths. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import remarkGfm from "remark-gfm";
|
||||
|
||||
export function MarkdownViewer({ content }: { content: string }) {
|
||||
return (
|
||||
<div className="prose prose-neutral dark:prose-invert max-w-none prose-pre:bg-muted prose-pre:text-foreground">
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>{content}</ReactMarkdown>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user