$ show jaywcjlove/linux-command
This repository is a community-driven collection of Linux command documentation in Chinese, presented as a static website. It includes a build system (scripts/build.mjs) that reads Markdown files from the command/ directory, generates a JSON index (dist/data.json), compiles Stylus to CSS, renders EJS templates to HTML, and produces a deployable static site. The project also generates offline documentation in Dash docset format (scripts/dash.mjs) and publishes an npm package (linux-command) containing the command index. The site is deployed to GitHub Pages, Vercel, Netlify, and as a Docker image. The architecture is a static site generator with a client-side search widget, dark mode, and copy-to-clipboard functionality. It is not a traditional application but a documentation platform with a well-structured build pipeline and multiple distribution channels.
The LLM identified 3 files worth highlighting for reuse:
The main build script that orchestrates the entire site generation: reads Markdown files, extracts metadata, generates JSON index, compiles Stylus to CSS, renders EJS templates to HTML, and copies assets. It is a self-contained Node.js script that could be adapted for any Markdown-based documentation site with minimal modification, demonstrating solid async file processing and template rendering skills.
Generates a Dash docset (.docset.tgz) from the command JSON index, including creating a SQLite database with index entries and compressing the output. This script is isolated and reusable for any documentation project that wants to provide offline access via Dash/Zeal, showcasing non-obvious skill in docset generation.
A self-contained JavaScript file that provides client-side search functionality for the static site. It loads a pre-built JSON index of commands and supports keyboard-navigable results. This pattern is easily extractable for any static site that needs search without a backend, demonstrating clean implementation of a common feature.