mirror of
https://github.com/plannotator/effective-html.git
synced 2026-09-19 01:11:19 +08:00
Publish Markdown page actions and copy updates
This commit is contained in:
@@ -72,7 +72,7 @@ Use $html-wireframe to explore three responsive layouts for this checkout brief.
|
||||
|
||||
Use $html-prototype to make the checkout flow work, including validation, loading, failure, success, keyboard, and mobile states.
|
||||
|
||||
Use $design-artifact with $html-diagram to give this architecture explainer a visual direction rooted in the system it describes.
|
||||
Use $design-artifact to follow this product's visual language and $html-diagram to turn the attached architecture brief into an interactive system map.
|
||||
```
|
||||
|
||||
`$html` can route a broad request, while `$design-artifact` can supply creative direction across artifact types. Call a specialist directly when you know the artifact type. Each specialist remains independently usable when invoked directly.
|
||||
|
||||
@@ -3,6 +3,7 @@ import { source } from "@/lib/source";
|
||||
import {
|
||||
DocsBody,
|
||||
DocsDescription,
|
||||
MarkdownCopyButton,
|
||||
DocsPage,
|
||||
DocsTitle,
|
||||
} from "fumadocs-ui/layouts/docs/page";
|
||||
@@ -27,6 +28,9 @@ export default async function Page({ params }: PageProps) {
|
||||
{page.data.description ? (
|
||||
<DocsDescription>{page.data.description}</DocsDescription>
|
||||
) : null}
|
||||
<div className="flex items-center border-b pt-2 pb-6">
|
||||
<MarkdownCopyButton markdownUrl={`${page.url}.md`} />
|
||||
</div>
|
||||
<DocsBody>
|
||||
<MDX components={getMDXComponents()} />
|
||||
</DocsBody>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { source } from "@/lib/source";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
interface RouteProps {
|
||||
params: Promise<{ slug?: string[] }>;
|
||||
}
|
||||
|
||||
/** Pre-render each guide's Markdown representation at build time. */
|
||||
export const revalidate = false;
|
||||
|
||||
/** Serve the processed Markdown for a guide page. */
|
||||
export async function GET(_request: Request, { params }: RouteProps) {
|
||||
const { slug } = await params;
|
||||
const page = source.getPage(slug);
|
||||
|
||||
if (!page) notFound();
|
||||
|
||||
const markdown = await page.data.getText("processed");
|
||||
|
||||
return new Response(`# ${page.data.title}\n\n${markdown}`, {
|
||||
headers: {
|
||||
"Content-Type": "text/markdown; charset=utf-8",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** Return every guide slug for static generation. */
|
||||
export function generateStaticParams() {
|
||||
return source.generateParams();
|
||||
}
|
||||
@@ -478,7 +478,7 @@ export function CatalogExplorer() {
|
||||
<p>
|
||||
{collection === "mockups"
|
||||
? "Three responsive, interactive HTML studies that borrow the information density and interaction grammar of familiar products."
|
||||
: "Readiness studies and high-fidelity product-interface studies, built as responsive, interactive HTML. Each one is the artifact, not a screenshot standing in for it."}
|
||||
: "Agents can build high-fidelity HTML alternatives that match the real product. Open them at realistic screen sizes, try the interactions, and compare possible changes before touching production."}
|
||||
</p>
|
||||
</header>
|
||||
<div className={styles.nativeExamples}>
|
||||
|
||||
@@ -3,6 +3,11 @@ import { loader } from "fumadocs-core/source";
|
||||
|
||||
const docs = defineDocs({
|
||||
dir: "content/docs",
|
||||
docs: {
|
||||
postprocess: {
|
||||
includeProcessedMarkdown: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const source = loader({
|
||||
|
||||
@@ -3,6 +3,18 @@ import { createMDX } from "fumadocs-mdx/next";
|
||||
/** @type {import("next").NextConfig} */
|
||||
const config = {
|
||||
reactStrictMode: true,
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: "/docs.md",
|
||||
destination: "/llms.mdx/docs",
|
||||
},
|
||||
{
|
||||
source: "/docs/:path*.md",
|
||||
destination: "/llms.mdx/docs/:path*",
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
const withMDX = createMDX();
|
||||
|
||||
Reference in New Issue
Block a user