⏱️ 2 min read

Build Process and Dependencies

This document describes how to build the gh_docs_bot application from source and lists the necessary dependencies.

Prerequisites

Before building the project, ensure that your development environment meets the following requirements:

Dependencies

The project relies on the following libraries. Most are handled automatically by CMake via FetchContent.

DependencyTypeSourceDescription
nlohmann_jsonExternalFetchContent (v3.11.2)JSON for Modern C++.
md4cExternalFetchContent (release-0.5.2)Markdown parser implementation.
CURLSystemfind_packageLibrary for transferring data with URLs.
injaEmbeddedinclude/inja.hppTemplate engine for Modern C++.

Configuration

The build references a configure subdirectory which generates rz_config.hpp with project metadata (Version, Author, etc.).

Build Instructions

Follow these steps to configure and build the application:

  1. Clone the repository:

    git clone https://github.com/Zheng-Bote/gh-docs-bot.git
    cd gh-docs-bot
    
  2. Configure the project:

    cmake -S . -B build
    
  3. Build the target:

    cmake --build build -j$(nproc) --target gh_docs_bot
    
  4. Install (Optional):

    sudo cmake --install build
    

Output

After a successful build, the executable gh_docs_bot will be available in the build/ directory (or build/Debug/build/Release depending on the platform/generator).

Usage

./build/gh_docs_bot <path/to/config.cfg> <path/to/documentation-folder>

Configuration

Example configuration file

[General]
template=docs/theme/desktop/fluid_template.html
assets=docs/theme/fluid/assets
output=docs/dist
base_path=https://zheng-bote.github.io/gha_ghpages/
toc=true

[plugins]
path=docs/ssg/plugins
enabled=markdown, html, toc, asciidoc, search, sitemap, mermaid, breadcrumb, reading_time, shortcode, minify, office, info, emoji

[reading_time]
threshold=200
wpm=200