nomadro/app/vip/ebook-cloudphone/page.tsx
eric 9f8fec1723 Ship portal PC/H5 acceptance, VIP ScrollReader, admin analytics and ops anchors.
Adds /api/health, ntfy notify on config save, /admin/analytics charts, and deploy smoke for miniprogram config/API.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 23:52:00 -05:00

24 lines
1005 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 { parseEbookMarkdown, estimateReadingMinutes } from "@vip/lib/content/ebook";
import { EbookViewer } from "@vip/app/components/content/EbookViewer";
import { CLOUDPHONE_EBOOK_CONFIG } from "@vip/config/content.config";
import { resolveVipDataFile } from "@vip/app/lib/resolveVipDataFile";
export const metadata = {
title: "云手机 | 低成本工作室搭建指南",
description: "云手机:低成本自建云手机,TikTok/YouTube 无人直播,Redroid、AOSP、ffmpeg、SRS 从零搭建。",
};
export default function CloudphoneEbookPage() {
const mdPath = resolveVipDataFile("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} />;
}