$ show bozhouDev/codex-orange-book
This repository is a comprehensive, non-official Chinese-language guide to OpenAI's Codex and ChatGPT products, titled 'ChatGPT 橙皮书' (Orange Book). It is primarily a documentation project that produces a static website and a downloadable PDF from a single Markdown source file. The production system is a static site hosted on GitHub Pages, providing an online reading experience with a table of contents, scroll progress tracking, and PDF download. The build pipeline consists of Python scripts that convert Markdown to HTML (build_site.py) and to PDF via headless Chrome (build_pdf.py), with image optimization and cover page support. The repository also includes a CI/CD workflow for deployment. While not a traditional software application, it functions as a documentation-as-code system with reusable build tooling and well-crafted front-end assets.
The LLM identified 4 files worth highlighting for reuse:
A self-contained Python script that converts a Markdown book into a PDF using headless Chrome. It handles cover page insertion, PNG-to-JPEG image optimization with configurable quality, and A4 print CSS. This pattern is reusable for any documentation project needing automated PDF generation from Markdown, with minimal adaptation required.
A Python script that transforms a single Markdown file into a deployable static HTML site with a table of contents, hero section, and responsive layout. It uses the Python markdown library and generates a complete site structure. This is a lightweight, reusable alternative to heavier static site generators for single-source documentation.
A well-crafted CSS file implementing a responsive two-column layout with a sticky table of contents, scroll progress bar, dark code blocks, and print-specific styling using @page. The design uses CSS Grid and clamp() for fluid typography. This stylesheet can be extracted and reused in any documentation site with similar structure.
A vanilla JavaScript file that enhances the reading experience with IntersectionObserver-based heading tracking to highlight the current section in the TOC, a scroll progress bar, and a back-to-top button. It is self-contained, dependency-free, and demonstrates a clean pattern for interactive documentation navigation that can be reused across projects.