Feat/wiki #38

Merged
robin merged 8 commits from feat/wiki into main 2026-08-06 15:42:35 +00:00
4 changed files with 72 additions and 17 deletions
Showing only changes of commit 28dc1ce6b1 - Show all commits

No files matched your search

+20 -12
View File
@@ -5,6 +5,7 @@ import rehypePrettyCode from 'rehype-pretty-code';
import rehypeSlug from 'rehype-slug'; import rehypeSlug from 'rehype-slug';
import rehypeAutolinkHeadings from 'rehype-autolink-headings'; import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import { Callout, Grid, Card, Steps, Step, InlineCode, CodeBlockContainer, API } from '@/components/mdx-components'; import { Callout, Grid, Card, Steps, Step, InlineCode, CodeBlockContainer, API } from '@/components/mdx-components';
import Article from '@/components/wiki/Article';
const mdxOptions = { const mdxOptions = {
mdxOptions: { mdxOptions: {
@@ -67,19 +68,26 @@ export default async function Page({ params }: PageProps) {
} }
return ( return (
<article className="prose prose-invert prose-blue max-w-4xl mx-auto p-6 md:p-12 min-h-screen"> // <article className="prose prose-invert prose-blue max-w-4xl mx-auto p-6 md:p-12 min-h-screen">
<header className="mb-8 border-b border-zinc-800 pb-6"> // <header className="mb-8 border-b border-zinc-800 pb-6">
<h1 className="text-4xl font-extrabold text-white mb-2 m-0">{article.title}</h1> // <h1 className="text-4xl font-extrabold text-white mb-2 m-0">{article.title}</h1>
{article.updatedAt && ( // {article.updatedAt && (
<p className="text-zinc-500 text-sm m-0">Zuletzt aktualisiert: {article.updatedAt}</p> // <p className="text-zinc-500 text-sm m-0">Zuletzt aktualisiert: {article.updatedAt}</p>
)} // )}
</header> // </header>
// <MDXRemote
// source={article.rawContent}
// components={mdxComponents}
// options={mdxOptions as any}
// />
// </article>
<Article title={article.title} updatedAt={article.updatedAt}>
<MDXRemote <MDXRemote
source={article.rawContent} source={article.rawContent}
components={mdxComponents} components={mdxComponents}
options={mdxOptions as any} options={mdxOptions as any}
/> />
</article> </Article>
); );
} }
+9
View File
@@ -0,0 +1,9 @@
import Article from "@/components/wiki/Article";
export default function Page() {
return (
<Article title="API-Endpunkte">
<p>hi</p>
</Article>
)
}
+22
View File
@@ -0,0 +1,22 @@
import { ReactNode } from "react";
interface ArticleProps {
title: string;
updatedAt?: string;
children: ReactNode
}
export default function Article({ title, updatedAt, children }: ArticleProps) {
return (
<article className="prose prose-invert prose-blue max-w-4xl mx-auto p-6 md:p-12 min-h-screen">
<header className="mb-8 border-b border-zinc-800 pb-6">
<h1 className="text-4xl font-extrabold text-white mb-2 m-0">{title}</h1>
{updatedAt && (
<p className="text-zinc-500 text-sm m-0">Zuletzt aktualisiert: {updatedAt}</p>
)}
</header>
{children}
</article>
);
}
+21 -5
View File
@@ -3,12 +3,8 @@ title: API
updatedAt: "2026-08-05" updatedAt: "2026-08-05"
--- ---
<Callout type="warning">
Diese Wiki-Seite ist derzeit nur zum Testen da. Bitte Informationen nicht anwenden!
</Callout>
<Callout type="info"> <Callout type="info">
Es weder eine Authentifikation noch ein API-Key notwendig. Es ist weder eine Authentifikation noch ein API-Key erforderlich.
</Callout> </Callout>
## API-Endpoints ## API-Endpoints
@@ -20,4 +16,24 @@ updatedAt: "2026-08-05"
</API> </API>
<API method="POST" route="stream/currentID"> <API method="POST" route="stream/currentID">
Lied zum Anzeigen festlegen Lied zum Anzeigen festlegen
</API>
### Lieder
<API method="GET" route="songs/[id]">
Informationen eines Liedes abrufen
</API>
<API method="POST" route="songs/attach">
Lied zu einem Liederbuch hinzufügen
</API>
<API method="POST" route="songs/attach">
Lied von einem Liederbuch entfernen
</API>
### Liederbücher
<API method="GET" route="songbooks">
Liste aller Liederbücher abrufen
</API>
<API method="POST" route="songbooks">
Neues Liederbuch erstellen
</API> </API>