Files
2026-03-12 00:34:50 -05:00

24 lines
966 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { readFileSync } from "fs";
import path from "path";
import { parseEbookMarkdown, estimateReadingMinutes } from "@/lib/content/ebook";
import { EbookViewer } from "@/app/components/content/EbookViewer";
import { CLOUDPHONE_EBOOK_CONFIG } from "@/config/content.config";
export const metadata = {
title: "云手机 | 低成本工作室搭建指南",
description: "云手机低成本自建云手机TikTok/YouTube 无人直播Redroid、AOSP、ffmpeg、SRS 从零搭建。",
};
export default function CloudphoneEbookPage() {
const mdPath = path.join(process.cwd(), "app/data/cloudphone.md");
const source = readFileSync(mdPath, "utf-8");
const data = parseEbookMarkdown(source);
const textLen = data.chunks.reduce((s, c) => s + c.html.replace(/<[^>]+>/g, "").length, 0);
const config = {
...CLOUDPHONE_EBOOK_CONFIG,
estimatedMinutes: estimateReadingMinutes(textLen),
};
return <EbookViewer data={data} config={config} />;
}