### mdpress quickstart usage examples Source: https://github.com/yeasy/mdpress/blob/main/docs/commands/quickstart.md Examples of running the quickstart command with default or custom target directories. ```bash mdpress quickstart mdpress quickstart my-book mdpress quickstart ./examples/demo-book ``` -------------------------------- ### Quickstart mdpress Source: https://github.com/yeasy/mdpress/blob/main/README.md Commands to initialize a new book project and start a local development server. ```bash # 1. Install mdpress (see Installation above) # 2. Create a sample book and preview it mdpress quickstart my-book cd my-book mdpress serve ``` -------------------------------- ### Setup development environment Source: https://github.com/yeasy/mdpress/blob/main/CONTRIBUTING.md Commands to clone the repository, build the project, run tests, and verify the build with an example. ```bash # 1. Clone the repo git clone https://github.com/yeasy/mdpress.git cd mdpress # 2. Build make build # 3. Run tests make test # 4. Run example to verify build make example ``` -------------------------------- ### Install and run mdPress Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/README.md Commands to install the mdPress CLI, initialize a new project, start a live preview server, and build all supported output formats. ```bash # Install go install github.com/yeasy/mdpress@latest # Create a new project mdpress quickstart my-book cd my-book # Preview in browser mdpress serve --open # Build all formats mdpress build --format all ``` -------------------------------- ### Complete book.yaml Example Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/themes/headers-footers.md A comprehensive example showing book metadata, chapters, style, and output configuration. ```yaml book: title: "mdPress Documentation" author: "mdPress Team" chapters: - title: Introduction file: chapters/01-introduction.md - title: Installation file: chapters/02-installation.md style: theme: technical header: left: "{title}" right: "{page}" footer: center: "Page {page} of {pages}" output: header: true footer: true margin_top: "18mm" margin_bottom: "18mm" ``` -------------------------------- ### Quickstart command usage Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/reference/cli-commands.md Creates a sample project structure in the specified directory. ```bash mdpress quickstart [directory] [--force] ``` -------------------------------- ### mdpress quickstart command syntax Source: https://github.com/yeasy/mdpress/blob/main/docs/commands/quickstart.md The basic syntax for the quickstart command, optionally accepting a target directory. ```bash mdpress quickstart [directory] [flags] ``` -------------------------------- ### Install Go and mdPress on Linux Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/ci-cd.md Manual installation steps for Go and mdPress on Ubuntu/Debian systems. ```bash # Install Go wget https://go.dev/dl/go1.26.0.linux-amd64.tar.gz tar -C /usr/local -xzf go1.26.0.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin # Install mdPress go install github.com/yeasy/mdpress@latest ``` -------------------------------- ### Install golangci-lint Source: https://github.com/yeasy/mdpress/blob/main/CONTRIBUTING.md Command to install the specific pinned version of the linter. ```bash go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2 ``` -------------------------------- ### mdpress quickstart Source: https://github.com/yeasy/mdpress/blob/main/docs/commands/quickstart.md Scaffolds a complete sample project in the specified directory. ```APIDOC ## mdpress quickstart ### Description Creates a complete sample project for evaluation purposes. This command generates a standard directory structure including configuration files and sample markdown chapters. ### Syntax `mdpress quickstart [directory] [flags]` ### Positional Arguments - **[directory]** (string) - Optional - Target directory for the project. Defaults to 'my-book'. ### Flags - **--force** (boolean) - Optional - Allow scaffolding into a non-empty directory. Existing files are not overwritten. - **-v, --verbose** (boolean) - Optional - Print detailed logs. - **-q, --quiet** (boolean) - Optional - Print errors only. ### Usage Example `mdpress quickstart my-book` ``` -------------------------------- ### Verify binary installation Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/troubleshooting/common-issues.md Confirm the installation status and system health after an upgrade. ```bash mdpress --version mdpress doctor ``` -------------------------------- ### mdpress upgrade command usage Source: https://github.com/yeasy/mdpress/blob/main/docs/commands/upgrade.md Examples for checking updates, performing an upgrade, enabling verbose output, and verifying the installed version. ```bash # Check for updates without installing mdpress upgrade --check # Install latest version (default behavior) mdpress upgrade # Install with verbose output for troubleshooting mdpress upgrade --verbose # Verify upgrade completed mdpress --version ``` -------------------------------- ### mdpress serve Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/reference/cli-commands.md Starts a live preview server for the project. ```APIDOC ## mdpress serve ### Description Starts the live preview server for the current directory, a local directory, or a GitHub URL. ### Usage `mdpress serve [source] [flags]` ### Flags - **--host** (string) - Optional - Sets the listen address. - **--port** (integer) - Optional - Sets the listen port. - **-o, --output** (string) - Optional - Sets the preview output directory. - **--open** (boolean) - Optional - Opens the browser automatically. - **--summary** (string) - Optional - Path to a specific SUMMARY.md file. - **--branch** (string) - Optional - Branch name for GitHub sources. - **--subdir** (string) - Optional - Subdirectory for GitHub sources. - **--allow-plugins** (boolean) - Optional - Executes plugins declared by a remote project's book.yaml. ``` -------------------------------- ### Start mdpress serve Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/guide/live-preview.md Starts the local HTTP server using the current directory by default. ```bash mdpress serve ``` -------------------------------- ### Install pre-commit hooks Source: https://github.com/yeasy/mdpress/blob/main/CONTRIBUTING.md Command to install the project's pre-commit hooks. ```bash make hooks ``` -------------------------------- ### Install mdpress dependencies Source: https://github.com/yeasy/mdpress/blob/main/internal/markdown/README.md Install the required goldmark packages using the Go CLI. ```bash go get github.com/yuin/goldmark go get github.com/yuin/goldmark-highlighting/v2 ``` -------------------------------- ### Incremental build workflow Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/performance.md Example of the development workflow using the live preview server. ```bash # Terminal 1: Start server $ mdpress serve [INFO] Serving at http://localhost:9000 [INFO] Watching for changes... # Terminal 2: Edit chapter $ vim chapters/ch03.md # ... make changes, save # Server automatically rebuilds (2 seconds) # Browser shows updated content ``` -------------------------------- ### Install Go and mdPress on macOS Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/ci-cd.md Installation steps for Go and mdPress on macOS using Homebrew. ```bash # Install Go via Homebrew brew install go # Install mdPress go install github.com/yeasy/mdpress@latest ``` -------------------------------- ### Install PDF backends or skip Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/troubleshooting/doctor.md Commands to install PDF backends or configure the path for Chromium, or build formats that do not require these backends. ```bash # macOS brew install chromium # or: brew install typst # Ubuntu/Debian sudo apt-get install chromium-browser # Chromium in a non-standard location export MDPRESS_CHROME_PATH=/path/to/chrome # Or skip the PDF backends entirely mdpress build --format site,html,epub ``` -------------------------------- ### Install mdPress Source: https://github.com/yeasy/mdpress/blob/main/docs/MIGRATION_FROM_GITBOOK.md Install the mdPress CLI tool using Go or download the binary from the releases page. ```bash go install github.com/yeasy/mdpress@latest # or download from https://github.com/yeasy/mdpress/releases ``` -------------------------------- ### Migrate a GitBook project Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/reference/cli-commands.md Example of running the migration command on a specific directory. ```bash # Migrate a GitBook project mdpress migrate ./gitbook-project ``` -------------------------------- ### No buildable book.yaml or SUMMARY.md warning Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/troubleshooting/doctor.md Example output when the target directory lacks the necessary configuration files. ```text ⚠ No directly buildable book.yaml or SUMMARY.md found in the target directory ``` -------------------------------- ### Build the word-count plugin Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/plugins/api.md Compiles the Go plugin located in the examples directory into the plugins folder. ```bash go build -o plugins/word-count ./examples/plugins/word-count ``` -------------------------------- ### mdpress doctor examples Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/reference/cli-commands.md Examples of running environment checks, generating reports, and using strict mode for CI. ```bash # Check environment mdpress doctor # Generate a JSON report mdpress doctor --report report.json # Fail the CI job on error-level findings mdpress doctor --strict # Check a specific project mdpress doctor ./docs ``` -------------------------------- ### README.md Landing Page Example Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/getting-started/project-structure.md The landing page file used for project introduction and navigation. ```markdown # Project Title Introduction text, overview, and navigation guidance. ## Key Sections - [Getting Started](chapters/getting-started.md) - [User Guide](chapters/guide/index.md) ``` -------------------------------- ### Zsh completion setup Source: https://github.com/yeasy/mdpress/blob/main/docs/commands/completion.md Commands to generate and source the zsh completion script. ```bash mdpress completion zsh source <(mdpress completion zsh) ``` -------------------------------- ### Bash completion setup Source: https://github.com/yeasy/mdpress/blob/main/docs/commands/completion.md Commands to generate and source the bash completion script. ```bash mdpress completion bash source <(mdpress completion bash) ``` -------------------------------- ### No PDF backend available error message Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/troubleshooting/doctor.md Example output when Chromium/Chrome and Typst are missing. ```text ✗ No PDF backend available: Chromium/Chrome and Typst are both missing (PDF output will fail) ``` -------------------------------- ### Start live preview server Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/performance.md Use the serve command to enable live reloading and incremental builds during development. ```bash # Start live preview server mdpress serve # Edit chapters and save # → Server automatically rebuilds affected chapters # → Preview updates in browser (no manual rebuild) ``` -------------------------------- ### Consistent Heading Hierarchy Example Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/organizing-large-books.md Demonstrates the recommended Markdown heading structure, starting with H1 for chapter titles and using H2 and H3 for sections and subsections. ```markdown # Chapter 1: Getting Started (H1 - chapter title) ## Section 1.1: Installation (H2 - main sections) ### Step 1: Download (H3 - subsections) #### Windows Installation (H4 - specific variants) ## Section 1.2: Configuration ### Basic Setup ### Advanced Options ``` -------------------------------- ### Initialize the demo project structure Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/plugins/building-a-plugin.md Create the necessary directories for the demo project. ```bash mkdir -p demo/chapters demo/plugins cd demo ``` -------------------------------- ### Korean search example Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/guide/search.md Example of a Korean search query. ```text 인증 토큰 ``` -------------------------------- ### Build and Preview Project Source: https://github.com/yeasy/mdpress/blob/main/docs/MIGRATION_FROM_GITBOOK.md Build the project and start a local preview server. You can optionally specify a custom path to SUMMARY.md. ```bash mdpress build mdpress serve ``` ```bash mdpress build --summary path/to/SUMMARY.md mdpress serve --summary path/to/SUMMARY.md ``` -------------------------------- ### Preview a GitHub repository Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/guide/live-preview.md Starts a preview for a remote GitHub repository, specifying the branch to use. ```bash mdpress serve https://github.com/yeasy/agentic_ai_guide --branch main ``` -------------------------------- ### Japanese search example Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/guide/search.md Example of a Japanese search query. ```text 認証トークン ``` -------------------------------- ### Recommended next commands Source: https://github.com/yeasy/mdpress/blob/main/docs/commands/quickstart.md Commands to navigate to the generated directory, build the project, and start a local preview server. ```bash cd my-book mdpress build --format html mdpress serve ``` -------------------------------- ### Example book.yaml configuration Source: https://github.com/yeasy/mdpress/blob/main/docs/COMMANDS.md A sample configuration snippet demonstrating how to set various output parameters like TOC depth, PDF timeout, watermarks, and margins. ```yaml output: toc_max_depth: 3 pdf_timeout: 300 watermark: "DRAFT" watermark_opacity: 0.15 margin_top: "20mm" margin_bottom: "20mm" margin_left: "25mm" margin_right: "25mm" generate_bookmarks: true ``` -------------------------------- ### Install CJK fonts Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/troubleshooting/doctor.md Commands to install CJK fonts on Ubuntu/Debian or Alpine Linux. ```bash sudo apt-get install fonts-noto-cjk # Ubuntu/Debian apk add font-noto-cjk # Alpine ``` -------------------------------- ### Initialize Configuration Source: https://github.com/yeasy/mdpress/blob/main/docs/MIGRATION_FROM_GITBOOK.md Generate a default book.yaml template for project configuration. ```bash mdpress init ``` -------------------------------- ### Create the introductory chapter file Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/plugins/building-a-plugin.md Create the content file for the introduction chapter. ```markdown # Introduction Some words to count in this chapter. ``` -------------------------------- ### Install mdPress via Homebrew Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/troubleshooting/faq.md Command to install mdPress on macOS using Homebrew. ```bash brew tap yeasy/tap && brew install --cask mdpress ``` -------------------------------- ### Development and Build Commands Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/performance.md Use the serve command for live preview feedback, and the build command with specific format flags for final distribution. ```bash # Fastest feedback: use serve for live preview mdpress serve # Then switch to final format for final builds mdpress build --format pdf # For distribution mdpress build --format site # For online documentation ``` -------------------------------- ### Install Chrome in CI Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/ci-cd.md Add this step to your CI configuration to install the chromium-browser package. ```yaml - name: Install Chrome run: | apt-get update apt-get install -y chromium-browser ``` -------------------------------- ### Mixed language search example Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/guide/search.md Example of a search query combining English and CJK terms. ```text API 文档 authentication ``` -------------------------------- ### Chinese search example Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/guide/search.md Example of a Chinese search query returning results for 'API' or '文档'. ```text API文档 ``` -------------------------------- ### Install Chrome for PDF Rendering on Alpine Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/ci-cd.md Command to install Chromium in an Alpine-based Docker container. ```dockerfile RUN apk add --no-cache chromium ``` -------------------------------- ### Init command usage Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/reference/cli-commands.md Scans Markdown files to generate a book.yaml configuration file. ```bash mdpress init [directory] [-i] ``` -------------------------------- ### Build and serve existing docs folder Source: https://github.com/yeasy/mdpress/blob/main/README.md Commands to build or serve documentation from a local directory. ```bash mdpress build ./docs --format html mdpress serve ./docs ``` -------------------------------- ### Configure book.yaml for full control Source: https://github.com/yeasy/mdpress/blob/main/README.md Example configuration file to define book metadata, chapters, and styling. ```yaml book: title: "My Book" author: "Author Name" chapters: - title: "Preface" file: "README.md" - title: "Getting Started" file: "chapter01/README.md" style: theme: "technical" # or "elegant", "minimal" output: toc: true cover: true ``` -------------------------------- ### Example directory structure for a 50-chapter book Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/organizing-large-books.md A sample file tree demonstrating how to organize chapters into parts and separate assets from content. ```text docs/ ├── book.yaml ├── SUMMARY.md ├── intro.md ├── part1/ │ ├── ch01.md │ ├── ch02.md │ └── ch03.md ├── part2/ │ ├── ch04.md │ ├── ch05.md │ └── ch06.md ├── appendices/ │ ├── glossary.md │ └── references.md └── assets/ ├── diagrams/ └── screenshots/ ``` -------------------------------- ### Python Code Highlighting Example Source: https://github.com/yeasy/mdpress/blob/main/examples/chapter01/README.md Example of Python code block supported by mdpress syntax highlighting. ```python def hello(): """mdpress supports syntax highlighting for many languages""" print("Hello, mdpress!") ``` -------------------------------- ### Go Code Highlighting Example Source: https://github.com/yeasy/mdpress/blob/main/examples/chapter01/README.md Example of Go code block supported by mdpress syntax highlighting. ```go package main import "fmt" func main() { fmt.Println("Hello, mdpress!") } ``` -------------------------------- ### mdpress init usage examples Source: https://github.com/yeasy/mdpress/blob/main/docs/commands/init.md Common usage patterns for initializing projects with or without interactive mode and target directories. ```bash mdpress init mdpress init ./docs-book mdpress init --interactive mdpress init ./docs-book -i ``` -------------------------------- ### Conventional Commits Example Source: https://github.com/yeasy/mdpress/blob/main/CONTRIBUTING.md An example of a commit message following the Conventional Commits specification for a new feature. ```text feat(config): add SUMMARY.md auto-discovery support When chapters are not defined in book.yaml, automatically look for SUMMARY.md in the same directory and parse chapter structure. Closes #42 ``` -------------------------------- ### Build with explicit source and configuration Source: https://github.com/yeasy/mdpress/blob/main/docs/commands/build.md Use these commands to specify a documentation directory or a custom configuration file instead of relying on automatic discovery. ```bash mdpress build ./docs --format html mdpress build --config ./docs/book.yaml ./docs --format pdf,html ``` -------------------------------- ### Verify Font Installation Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/troubleshooting/common-issues.md Use fc-list and fc-match to confirm that the required fonts are installed and recognized by the system. ```bash # List installed fonts (Linux) fc-list | grep -i "noto" # Verify font is available fc-match "Noto Sans CJK SC" ``` -------------------------------- ### Initialize and serve a new mdpress project Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/getting-started/quickstart.md Commands to create a new project directory, build the documentation, and launch a local server with the browser opened automatically. ```bash mdpress quickstart my-book cd my-book mdpress build mdpress serve --open ``` -------------------------------- ### Start Incremental Development with mdpress serve Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/organizing-large-books.md Use the serve command to enable live preview with automatic incremental rebuilding of affected chapters. ```bash # Start development server for live preview mdpress serve # This watches file changes and rebuilds only affected chapters # No need for --no-cache during development ``` -------------------------------- ### Install CJK Fonts on macOS Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/ci-cd.md Command to install Noto CJK fonts on macOS using Homebrew. ```bash # Already included with system fonts # Or install Noto fonts separately: brew install font-noto-sans-cjk ``` -------------------------------- ### Install CJK Fonts on Alpine Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/ci-cd.md Command to install Noto CJK fonts in an Alpine-based Docker container. ```dockerfile RUN apk add --no-cache font-noto-cjk ``` -------------------------------- ### Install Chrome for PDF Rendering on Ubuntu/Debian Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/ci-cd.md Commands to install Chromium or Google Chrome on Debian-based systems. ```bash apt-get update apt-get install -y chromium-browser # or: apt-get install -y google-chrome-stable ``` -------------------------------- ### Complete migration workflow examples Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/guide/migrating-from-gitbook.md Common command patterns for migrating a project, including previewing, executing, and forcing an overwrite of existing configuration files. ```bash # Preview the migration first mdpress migrate ./my-gitbook --dry-run # Then perform the actual migration (rewrites files in place) mdpress migrate ./my-gitbook # Overwrite an existing book.yaml as well mdpress migrate ./my-gitbook --force ``` -------------------------------- ### Verify mdPress Installation Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/getting-started/installation.md Check that the installation was successful by viewing the help menu or running the doctor command. ```bash mdpress --help mdpress doctor ``` -------------------------------- ### Switch Themes and Rebuild Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/themes/builtin-themes.md Update the theme in book.yaml and rebuild the project or use the live server to see changes. ```bash # Edit book.yaml vim book.yaml # Rebuild with new theme mdpress build # Or watch with live reload mdpress serve ``` -------------------------------- ### Example deployment URL structure Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/guide/multi-language.md The output tree structure showing the root language switcher and individual language directories. ```text https://docs.example.com/ <- language switcher https://docs.example.com/en/ https://docs.example.com/zh/ ``` -------------------------------- ### Advanced Configuration Cross-Reference Example Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/organizing-large-books.md An example of referencing previous chapters and related documentation within a chapter file. ```markdown # Advanced Configuration As discussed in [Basic Setup](../introduction/setup.md), you should first install the core package. This chapter builds on those foundations. See also: - [Performance Tuning](performance.md) in this part - [Troubleshooting](../appendix/troubleshooting.md) - [API Reference](../reference/api.md) ``` -------------------------------- ### Build and serve from a GitHub repository Source: https://github.com/yeasy/mdpress/blob/main/README.md Commands to process documentation directly from a remote GitHub URL. ```bash mdpress build https://github.com/yeasy/agentic_ai_guide --format html mdpress serve https://github.com/yeasy/agentic_ai_guide ``` -------------------------------- ### GitBook plugin warning example Source: https://github.com/yeasy/mdpress/blob/main/docs/commands/migrate.md Example of a warning message displayed when a plugin lacks a direct mdPress equivalent. ```text Warnings: ! GitBook plugin "disqus" has no direct mdpress equivalent — you may need to manually implement equivalent features ``` -------------------------------- ### Build Alternative Formats Source: https://github.com/yeasy/mdpress/blob/main/examples/chapter01/README.md Build the project into static website, HTML, or EPUB formats using the --format flag. ```bash mdpress build --format site # static website in _book/ mdpress build --format html,epub # standalone HTML and EPUB ``` -------------------------------- ### Install CJK Fonts on Ubuntu/Debian Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/ci-cd.md Command to install Noto CJK fonts for multi-language support on Debian-based systems. ```bash apt-get install -y fonts-noto-cjk fonts-noto-cjk-extra ``` -------------------------------- ### Project static directory structure Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/reference/configuration.md Example of a project layout showing the static directory alongside book.yaml. ```text book.yaml static/ ├── CNAME └── .nojekyll ``` -------------------------------- ### Install Chrome for PDF Rendering on macOS Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/best-practices/ci-cd.md Commands to install Chromium or Google Chrome on macOS using Homebrew. ```bash brew install chromium # or: brew install google-chrome ``` -------------------------------- ### mdpress init Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/reference/cli-commands.md Initializes a new project by scanning Markdown files and generating a book.yaml. ```APIDOC ## mdpress init ### Description Scans Markdown files and generates a book.yaml configuration file. ### Usage `mdpress init [directory] [-i]` ### Flags - **-i, --interactive** (boolean) - Optional - Prompts for title, author, language, and theme. ``` -------------------------------- ### External GitBook Link Example Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/guide/migrating-from-gitbook.md Example of a Markdown link pointing to an external GitBook project that remains unchanged after migration. ```markdown [See other docs](https://docs.example.gitbook.io) ``` -------------------------------- ### Complete Theme Customization Example Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/themes/custom-css.md Configure the technical theme in book.yaml and provide the corresponding custom.css file. ```yaml # book.yaml book: title: "API Documentation" author: "Development Team" style: theme: technical custom_css: styles/custom.css ``` ```css /* styles/custom.css */ :root { --primary-color: #0056b3; --accent-color: #fd7e14; --font-family-base: "Inter", sans-serif; --font-size-base: 17px; } .content { font-feature-settings: "kern" 1; text-rendering: optimizeLegibility; } .content h1 { background: linear-gradient(135deg, var(--primary-color) 0%, #004085 100%); color: white; padding: 0.5em 1em; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; } .content code { background: #f8f9fa; color: #d63384; border: 1px solid #dee2e6; } .callout { background: linear-gradient(90deg, var(--background-alt) 0%, white 100%); box-shadow: 0 2px 4px rgba(0,0,0,0.05); } @media (max-width: 767px) { .content h1 { font-size: 1.5em; } } ``` -------------------------------- ### Install mdPress via Homebrew Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/getting-started/installation.md Use Homebrew to install the mdPress cask on macOS. The cask automatically handles the macOS quarantine flag. ```bash brew tap yeasy/tap brew install --cask mdpress ``` -------------------------------- ### Directory Layout for Multi-Language Projects Source: https://github.com/yeasy/mdpress/blob/main/docs/manual/en/guide/multi-language.md Example structure showing the root LANGS.md file and individual language directories. ```text book/ ├── LANGS.md <- the only thing that makes this a multi-language project ├── en/ │ ├── book.yaml │ ├── README.md │ └── guide.md └── zh/ ├── book.yaml ├── README.md └── guide.md ```