$ show CarGuo/gsy_flutter_book
This repository is a comprehensive, Chinese-language technical knowledge base and online book focused on Flutter and Dart development. It contains over 300 Markdown articles covering everything from basic Flutter widgets and state management to deep dives into rendering engines (Impeller, Skia), platform-specific issues (iOS 26 keyboard, Android Vulkan), Dart language features, and ecosystem trends. The content is published as a VitePress static site with offline search (Pagefind) and is also compiled into a downloadable PDF. While the repository is primarily a documentation site (not an application or data pipeline), it includes a well-engineered build system with automated CI/CD deployment, PDF generation via Puppeteer, and a custom search component. The articles are high-quality technical writing, often referencing official Flutter issues and PRs, making it a valuable resource for Flutter developers. However, the codebase itself is limited to build scripts and theme configuration, with no executable application code.
The LLM identified 4 files worth highlighting for reuse:
A Node.js script that converts a VitePress static site into a single PDF book. It launches a local server, uses Puppeteer to render each page as PDF, merges them with pdf-lib, and supports custom headers/footers, image compression (via CDN query parameters), and page range selection. This is a self-contained, reusable pipeline for any VitePress documentation project that wants to offer a PDF download.
A migration script that reads a GitBook-style SUMMARY.md and restructures the markdown files into a VitePress-compatible directory layout. It handles image path rewriting, sidebar generation, and file moves. Though intended for a one-time migration, the pattern is reusable for any project transitioning from a flat markbook structure to a hierarchical static site generator.
A Vue 3 component that integrates Pagefind offline search into a VitePress site. It provides a modal with keyboard navigation, search result highlighting, and grouped sub-results. The component is self-contained (imports only Pagefind and Vue) and can be extracted and reused in any VitePress project that wants a polished search experience.
A well-documented Nginx configuration template for serving a static site with best practices: gzip compression, caching headers for assets, and special handling for Pagefind search index files. It includes security headers and can be adapted for any static site deployment, not just this project.